Skip to content

Commit

Permalink
test: migrated no-done.test.js from tap to node:test (#291)
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 cd0e43c commit 0c19f2d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/no-done.test.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
'use strict'

const { test } = require('tap')
const { test } = require('node:test')
const boot = require('..')

test('not taking done does not throw error.', (t) => {
test('not taking done does not throw error.', (t, testDone) => {
t.plan(2)

const app = boot()

app.use(noDone).ready((err) => {
t.notOk(err, 'no error')
t.assert.strictEqual(err, null, 'no error')
testDone()
})

function noDone (s, opts) {
t.pass('did not throw')
t.assert.ok('did not throw')
}
})

0 comments on commit 0c19f2d

Please sign in to comment.