Skip to content

Commit

Permalink
test: migrated events-listeners.test.js from tap to node:test (#288)
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 54be0e6 commit de84338
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/events-listeners.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use strict'

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

test('boot a plugin and then execute a call after that', (t) => {
test('boot a plugin and then execute a call after that', (t, testDone) => {
t.plan(1)

process.on('warning', (warning) => {
t.fail('we should not get a warning', warning)
t.assert.fail('we should not get a warning')
})

const app = boot()
Expand All @@ -17,6 +17,7 @@ test('boot a plugin and then execute a call after that', (t) => {
}

setTimeout(() => {
t.pass('Everything ok')
t.assert.ok('Everything ok')
testDone()
}, 500)
})

0 comments on commit de84338

Please sign in to comment.