Aktueller Stand
This commit is contained in:
19
backend/node_modules/fastify/test/bundler/esbuild/bundler-test.js
generated
vendored
19
backend/node_modules/fastify/test/bundler/esbuild/bundler-test.js
generated
vendored
@@ -1,31 +1,32 @@
|
||||
'use strict'
|
||||
|
||||
const t = require('tap')
|
||||
const test = t.test
|
||||
const { test } = require('node:test')
|
||||
const fastifySuccess = require('./dist/success')
|
||||
const fastifyFailPlugin = require('./dist/failPlugin')
|
||||
|
||||
test('Bundled package should work', (t) => {
|
||||
test('Bundled package should work', (t, done) => {
|
||||
t.plan(4)
|
||||
fastifySuccess.ready((err) => {
|
||||
t.error(err)
|
||||
t.assert.ifError(err)
|
||||
fastifySuccess.inject(
|
||||
{
|
||||
method: 'GET',
|
||||
url: '/'
|
||||
},
|
||||
(error, res) => {
|
||||
t.error(error)
|
||||
t.equal(res.statusCode, 200)
|
||||
t.same(res.json(), { hello: 'world' })
|
||||
t.assert.ifError(error)
|
||||
t.assert.strictEqual(res.statusCode, 200)
|
||||
t.assert.deepStrictEqual(res.json(), { hello: 'world' })
|
||||
done()
|
||||
}
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
test('Bundled package should not work with bad plugin version', (t) => {
|
||||
test('Bundled package should not work with bad plugin version', (t, done) => {
|
||||
t.plan(1)
|
||||
fastifyFailPlugin.ready((err) => {
|
||||
t.match(err.message, /expected '9.x' fastify version/i)
|
||||
t.assert.match(err.message, /expected '9.x' fastify version/i)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
2
backend/node_modules/fastify/test/bundler/esbuild/package.json
generated
vendored
2
backend/node_modules/fastify/test/bundler/esbuild/package.json
generated
vendored
@@ -5,6 +5,6 @@
|
||||
"test": "npm run bundle && node bundler-test.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.14.11"
|
||||
"esbuild": "^0.25.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user