Skip to content

Commit

Permalink
test: migrated errors.test.js from tap to node:test (#287)
Browse files Browse the repository at this point in the history
Co-authored-by: hanquliu <[email protected]>
  • Loading branch information
liuhanqu and hanquliu authored Jan 3, 2025
1 parent de84338 commit ff2ff05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/errors.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { test } = require('tap')
const { test } = require('node:test')
const errors = require('../lib/errors')

test('Correct codes of AvvioErrors', t => {
Expand All @@ -17,10 +17,10 @@ test('Correct codes of AvvioErrors', t => {

t.plan(testcases.length + 1)
// errors.js exposes errors and the createError fn
t.equal(testcases.length, Object.keys(errors).length)
t.assert.strictEqual(testcases.length, Object.keys(errors).length)

for (const testcase of testcases) {
const error = new errors[testcase]()
t.equal(error.code, testcase)
t.assert.strictEqual(error.code, testcase)
}
})

0 comments on commit ff2ff05

Please sign in to comment.