-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate test suite from tap to node:test
- Loading branch information
1 parent
97ec7bc
commit dc5d22e
Showing
9 changed files
with
154 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
'use strict' | ||
|
||
const t = require('tap') | ||
const test = t.test | ||
const { test } = require('node:test') | ||
const fp = require('../plugin') | ||
|
||
test('anonymous function should be named composite.test0', t => { | ||
test('anonymous function should be named composite.test0', async (t) => { | ||
t.plan(2) | ||
|
||
const fn = fp((fastify, opts, next) => { | ||
next() | ||
}) | ||
|
||
t.equal(fn[Symbol.for('plugin-meta')].name, 'composite.test-auto-0') | ||
t.equal(fn[Symbol.for('fastify.display-name')], 'composite.test-auto-0') | ||
t.assert.strictEqual(fn[Symbol.for('plugin-meta')].name, 'composite.test-auto-0') | ||
t.assert.strictEqual(fn[Symbol.for('fastify.display-name')], 'composite.test-auto-0') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
'use strict' | ||
|
||
const t = require('tap') | ||
const test = t.test | ||
const { test } = require('node:test') | ||
const fp = require('../plugin') | ||
|
||
test('anonymous function should be named mu1tip1e.composite.test', t => { | ||
test('anonymous function should be named mu1tip1e.composite.test', async (t) => { | ||
t.plan(2) | ||
|
||
const fn = fp((fastify, opts, next) => { | ||
next() | ||
}) | ||
|
||
t.equal(fn[Symbol.for('plugin-meta')].name, 'mu1tip1e.composite.test-auto-0') | ||
t.equal(fn[Symbol.for('fastify.display-name')], 'mu1tip1e.composite.test-auto-0') | ||
t.assert.strictEqual(fn[Symbol.for('plugin-meta')].name, 'mu1tip1e.composite.test-auto-0') | ||
t.assert.strictEqual(fn[Symbol.for('fastify.display-name')], 'mu1tip1e.composite.test-auto-0') | ||
}) |
Oops, something went wrong.