diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b00276..bbfcb5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,8 @@ on: jobs: test: - uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3 + uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.2.1 with: license-check: true lint: true + node-versions: '["16", "18", "20", "22"]' diff --git a/package.json b/package.json index 0cf6825..41e8071 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ "test:typescript": "tsd" }, "devDependencies": { - "@types/node": "^20.1.0", + "@types/node": "^20.11.30", "beautify-benchmark": "^0.2.4", "benchmark": "^2.1.4", - "standard": "^17.0.0", - "tap": "^16.3.0", + "standard": "^17.1.0", + "tap": "^18.7.1", "tsd": "^0.31.0" }, "keywords": [ diff --git a/test/secret.test.js b/test/secret.test.js index b402a55..2957795 100644 --- a/test/secret.test.js +++ b/test/secret.test.js @@ -1,6 +1,6 @@ 'use strict' -const { test, mock } = require('tap') +const { test, mockRequire } = require('tap') const Tokens = require('..') test('Tokens.secret: should reject bad callback', t => { @@ -75,7 +75,7 @@ test('Tokens.secret: should not contain /, +, or =, callback', t => { test('Tokens.secret: should handle error, Promise', t => { t.plan(2) - const Tokens = mock('..', { + const Tokens = mockRequire('..', { 'node:crypto': { randomBytes: (_size, cb) => { cb(new Error('oh no')) @@ -93,7 +93,7 @@ test('Tokens.secret: should handle error, Promise', t => { test('Tokens.secret: should handle error, callback', t => { t.plan(2) - const Tokens = mock('..', { + const Tokens = mockRequire('..', { 'node:crypto': { randomBytes: (size, cb) => { cb(new Error('oh no'))