Skip to content

Commit eda7a51

Browse files
authored
feat: Integration testing (#69)
* feat: Integration tests * fix: start/stop stub wallet on setupTests.js * fix: remove server.js and keep only index.js * feat: adding github workflow yml for tests * chore: sanitize package-lock.json * feat: increasing code coverage * feat: create-token tests * feat: mint and melt tests * feat: test /address with index = 0 * fix: improving tests * fix: removing codecov PR comment
1 parent a615d0b commit eda7a51

26 files changed

+5093
-200
lines changed

.babelrc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"presets": [
3-
"@babel/preset-env"
4-
]
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"node": "current"
8+
}
9+
}
10+
]
11+
],
12+
"plugins": ["@babel/plugin-proposal-class-properties"]
513
}

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- dev
7+
tags:
8+
- v*
9+
pull_request:
10+
branches:
11+
- dev
12+
- master
13+
jobs:
14+
test:
15+
runs-on: "ubuntu-latest"
16+
timeout-minutes: 40 # default is 360
17+
strategy:
18+
matrix:
19+
node-version: [8.x, 10.x, 12.x, 14.x]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- name: Install dependencies
27+
run: npm install
28+
- name: Test
29+
run: npm run test
30+
- name: Upload coverage
31+
uses: codecov/codecov-action@v1
32+
if: ${{ matrix.node-version }} == 14.x
33+
with:
34+
verbose: true

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
config.js
44

55
node_modules/
6+
7+
coverage
8+
9+
.DS_Store

README.md

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

34
This is a headless Hathor Wallet, i.e., without a graphical user interface. It is controlled by its HTTP API.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default {
2+
http_bind_address: "fakehost",
3+
http_port: 8001,
4+
network: "testnet",
5+
server: "http://fakehost:8083/v1a/",
6+
seeds: {
7+
stub_seed:
8+
"upon tennis increase embark dismiss diamond monitor face magnet jungle scout salute rural master shoulder cry juice jeans radar present close meat antenna mind",
9+
},
10+
tokenUid: "",
11+
gapLimit: null,
12+
};

0 commit comments

Comments
 (0)