Skip to content

feat: Integration testing #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"presets": [
"@babel/preset-env"
]
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: tests
on:
push:
branches:
- master
- dev
tags:
- v*
pull_request:
branches:
- dev
- master
jobs:
test:
runs-on: "ubuntu-latest"
timeout-minutes: 40 # default is 360
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Test
run: npm run test
- name: Upload coverage
uses: codecov/codecov-action@v1
if: ${{ matrix.node-version }} == 14.x
with:
verbose: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
config.js

node_modules/

coverage

.DS_Store
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![codecov](https://codecov.io/gh/HathorNetwork/hathor-wallet-headless/branch/master/graph/badge.svg?token=NZ3BPUX9V7)](https://codecov.io/gh/HathorNetwork/hathor-wallet-headless)
# Hathor Wallet Headless

This is a headless Hathor Wallet, i.e., without a graphical user interface. It is controlled by its HTTP API.
Expand Down
12 changes: 12 additions & 0 deletions __tests__/__fixtures__/config-fixture.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
http_bind_address: "fakehost",
http_port: 8001,
network: "testnet",
server: "http://fakehost:8083/v1a/",
seeds: {
stub_seed:
"upon tennis increase embark dismiss diamond monitor face magnet jungle scout salute rural master shoulder cry juice jeans radar present close meat antenna mind",
},
tokenUid: "",
gapLimit: null,
};
Loading