diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4723a9b..b3eba58 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/package.json b/package.json index 4c6feab..bdbdaa7 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/services/serviceHelper.ts b/src/services/serviceHelper.ts index fb32336..0bd0ced 100644 --- a/src/services/serviceHelper.ts +++ b/src/services/serviceHelper.ts @@ -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); diff --git a/tests/unit/networkFeesService.spec.ts b/tests/unit/networkFeesService.spec.ts index e3b9eb8..e098b6a 100644 --- a/tests/unit/networkFeesService.spec.ts +++ b/tests/unit/networkFeesService.spec.ts @@ -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'); @@ -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');