Skip to content

Commit

Permalink
properly exit test suite
Browse files Browse the repository at this point in the history
alchemy secrets
mongo deprecation
  • Loading branch information
TheTrunk committed Aug 17, 2024
1 parent e1191b7 commit 32c8a00
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ jobs:
run: |
echo $SERVICE_ACCOUNT_CONFIG > config/serviceAccountKey.json
echo $API_SECRETS > config/apisecrets.ts
echo $ALCHEMY_SECRETS > config/alchemysecrets.ts
touch logs/debug.log logs/error.log logs/info.log
shell: bash
env:
SERVICE_ACCOUNT_CONFIG: ${{ secrets.SERVICE_ACCOUNT_CI }}
API_SECRETS: ${{ secrets.API_SECRETS }}
ALCHEMY_SECRETS: ${{ secrets.ALCHEMY_SECRETS }}
- name: Run tests and collect coverage
run: |
npm run test
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"start": "tsc && tsx index.ts",
"test": "nyc --reporter=lcov ts-mocha -p tsconfig.json tests/**/*.spec.ts",
"test": "nyc --reporter=lcov ts-mocha -p tsconfig.json tests/**/*.spec.ts --exit",
"lint": "eslint ./",
"lint:fix": "eslint ./ --fix",
"type-check": "tsc",
Expand Down
2 changes: 0 additions & 2 deletions src/services/serviceHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ function ensureString(parameter) {
async function connectMongoDb(url?) {
const connectUrl = url || mongoUrl;
const mongoSettings = {
useNewUrlParser: true,
useUnifiedTopology: true,
maxPoolSize: 100,
};
const db = await MongoClient.connect(connectUrl, mongoSettings);
Expand Down
6 changes: 2 additions & 4 deletions tests/unit/networkFeesService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ describe('Network Fees Service', () => {
});
});

// Please provide valid key in URL before testing
it.skip('should return eth fees when valid', async () => {
it('should return eth fees when valid', async () => {
await networkFeesService.obtainEthFees().then((r) => {
assert.equal(r.coin, 'eth');
expect(r).to.have.property('economy');
Expand All @@ -68,8 +67,7 @@ describe('Network Fees Service', () => {
});
});

// Please provide valid key in URL before testing
it.skip('should return sepolia fees when valid', async () => {
it('should return sepolia fees when valid', async () => {
await networkFeesService.obtainSepoliaFees().then((r) => {
assert.equal(r.coin, 'sepolia');
expect(r).to.have.property('economy');
Expand Down

0 comments on commit 32c8a00

Please sign in to comment.