Skip to content

Commit 3d649b4

Browse files
authored
Merge pull request #66 from JJ-Cro/master
feat(): separated private and public tests
2 parents 15931f6 + 51d9131 commit 3d649b4

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.github/workflows/e2etests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build:
10-
name: "Build & Test"
10+
name: "Build, Lint & Test"
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -32,8 +32,11 @@ jobs:
3232
- name: Check Lint
3333
run: npm run lint
3434

35-
- name: Test
36-
run: npm run test
35+
- name: Run Public Tests
36+
run: npm run test:public
37+
38+
- name: Run Private Tests
39+
run: npm run test:private
3740
env:
3841
API_KEY_COM: ${{ secrets.API_KEY_COM }}
3942
API_SECRET_COM: ${{ secrets.API_SECRET_COM }}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"scripts": {
1212
"test": "jest",
1313
"test:watch": "jest --watch",
14+
"test:public": "jest --testPathIgnorePatterns='.*private.*'",
15+
"test:private": "jest --testPathPattern='.*private.*'",
1416
"clean": "rm -rf lib dist",
1517
"build": "tsc",
1618
"build:clean": "npm run clean && npm run build",

test/ws.private.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe.skip('Private Spot Websocket Client', () => {
9090
event: 'login',
9191
});
9292
} catch (e) {
93-
console.error(`Wait for "books" subscription response exception: `, e);
93+
console.error('Wait for "books" subscription response exception: ', e);
9494
expect(e).toBeFalsy();
9595
}
9696
});

test/ws.public.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Public Spot Websocket Client', () => {
5050
wsKey: WS_KEY_MAP.spotv1,
5151
});
5252
} catch (e) {
53-
console.error(`Wait for "books" subscription response exception: `, e);
53+
console.error('Wait for "books" subscription response exception: ', e);
5454
expect(e).toBeFalsy();
5555
}
5656

@@ -67,7 +67,7 @@ describe('Public Spot Websocket Client', () => {
6767
wsKey: 'spotv1',
6868
});
6969
} catch (e) {
70-
console.error(`Wait for "books" event exception: `, e);
70+
console.error('Wait for "books" event exception: ', e);
7171
expect(e).toBeFalsy();
7272
}
7373
});

0 commit comments

Comments
 (0)