diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4f444c..fb08872 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,10 +9,6 @@ on: - "docs/**" - "*.md" -env: - CI: true - COVERALLS: 0 - jobs: build: runs-on: ${{ matrix.os }} @@ -40,23 +36,3 @@ jobs: - name: Tests id: test run: npm run test - - - name: Coveralls Parallel - id: coveralls - uses: coverallsapp/github-action@master - if: env.COVERALLS == 1 - with: - github-token: ${{ secrets.github_token }} - parallel: true - - coverage: - needs: build - runs-on: ubuntu-latest - if: env.COVERALLS == 1 - steps: - - name: Coveralls Finished - id: send_coveralls_report - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - parallel-finished: true diff --git a/package.json b/package.json index 4612a8a..4028680 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ "ajv-errors": "^1.0.1", "ajv-merge-patch": "^4.1.0", "standard": "^16.0.3", - "tap": "^14.11.0" + "tap": "^15.0.1" }, "dependencies": { "ajv": "^6.12.6" } -} +} \ No newline at end of file diff --git a/test/index.test.js b/test/index.test.js index c5cc7d8..0c8f666 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -43,7 +43,7 @@ t.test('basic usage', t => { const compiler = factory(externalSchemas1, fastifyAjvOptionsDefault) const validatorFunc = compiler({ schema: sampleSchema }) const result = validatorFunc({ name: 'hello' }) - t.equals(result, true) + t.equal(result, true) }) t.test('plugin loading', t => { @@ -69,11 +69,11 @@ t.test('plugin loading', t => { } }) const result = validatorFunc({ q: 'hello' }) - t.equals(result, true) + t.equal(result, true) const resultFail = validatorFunc({ }) - t.equals(resultFail, false) - t.equals(validatorFunc.errors[0].message, 'hello world') + t.equal(resultFail, false) + t.equal(validatorFunc.errors[0].message, 'hello world') }) t.test('optimization - cache ajv instance', t => { @@ -81,15 +81,15 @@ t.test('optimization - cache ajv instance', t => { const factory = AjvCompiler() const compiler1 = factory(externalSchemas1, fastifyAjvOptionsDefault) const compiler2 = factory(externalSchemas1, fastifyAjvOptionsDefault) - t.equals(compiler1, compiler2, 'same instance') - t.deepEquals(compiler1, compiler2, 'same instance') + t.equal(compiler1, compiler2, 'same instance') + t.same(compiler1, compiler2, 'same instance') const compiler3 = factory(externalSchemas2, fastifyAjvOptionsDefault) - t.notEqual(compiler3, compiler1, 'new ajv instance when externa schema change') + t.not(compiler3, compiler1, 'new ajv instance when externa schema change') const compiler4 = factory(externalSchemas1, fastifyAjvOptionsCustom) - t.notEqual(compiler4, compiler1, 'new ajv instance when externa schema change') - t.notEqual(compiler4, compiler3, 'new ajv instance when externa schema change') + t.not(compiler4, compiler1, 'new ajv instance when externa schema change') + t.not(compiler4, compiler3, 'new ajv instance when externa schema change') }) // https://github.com/fastify/fastify/pull/2969