feat(): separated private and public tests

This commit is contained in:
JJ-Cro
2025-03-15 12:05:51 +01:00
parent 15931f6ed5
commit 51d9131f17
4 changed files with 11 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ on:
jobs: jobs:
build: build:
name: "Build & Test" name: "Build, Lint & Test"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -32,8 +32,11 @@ jobs:
- name: Check Lint - name: Check Lint
run: npm run lint run: npm run lint
- name: Test - name: Run Public Tests
run: npm run test run: npm run test:public
- name: Run Private Tests
run: npm run test:private
env: env:
API_KEY_COM: ${{ secrets.API_KEY_COM }} API_KEY_COM: ${{ secrets.API_KEY_COM }}
API_SECRET_COM: ${{ secrets.API_SECRET_COM }} API_SECRET_COM: ${{ secrets.API_SECRET_COM }}

View File

@@ -11,6 +11,8 @@
"scripts": { "scripts": {
"test": "jest", "test": "jest",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"test:public": "jest --testPathIgnorePatterns='.*private.*'",
"test:private": "jest --testPathPattern='.*private.*'",
"clean": "rm -rf lib dist", "clean": "rm -rf lib dist",
"build": "tsc", "build": "tsc",
"build:clean": "npm run clean && npm run build", "build:clean": "npm run clean && npm run build",

View File

@@ -90,7 +90,7 @@ describe.skip('Private Spot Websocket Client', () => {
event: 'login', event: 'login',
}); });
} catch (e) { } catch (e) {
console.error(`Wait for "books" subscription response exception: `, e); console.error('Wait for "books" subscription response exception: ', e);
expect(e).toBeFalsy(); expect(e).toBeFalsy();
} }
}); });

View File

@@ -50,7 +50,7 @@ describe('Public Spot Websocket Client', () => {
wsKey: WS_KEY_MAP.spotv1, wsKey: WS_KEY_MAP.spotv1,
}); });
} catch (e) { } catch (e) {
console.error(`Wait for "books" subscription response exception: `, e); console.error('Wait for "books" subscription response exception: ', e);
expect(e).toBeFalsy(); expect(e).toBeFalsy();
} }
@@ -67,7 +67,7 @@ describe('Public Spot Websocket Client', () => {
wsKey: 'spotv1', wsKey: 'spotv1',
}); });
} catch (e) { } catch (e) {
console.error(`Wait for "books" event exception: `, e); console.error('Wait for "books" event exception: ', e);
expect(e).toBeFalsy(); expect(e).toBeFalsy();
} }
}); });