Projektstart

This commit is contained in:
2026-01-22 15:49:12 +01:00
parent 7212eb6f7a
commit 57e5f652f8
10637 changed files with 2598792 additions and 64 deletions

28
backend/node_modules/@fastify/send/test/utils.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict'
const http = require('http')
const send = require('..')
module.exports.shouldNotHaveHeader = function shouldNotHaveHeader (header, t) {
return function (res) {
t.ok(!(header.toLowerCase() in res.headers), 'should not have header ' + header)
}
}
module.exports.createServer = function createServer (opts, fn) {
return http.createServer(function onRequest (req, res) {
try {
fn && fn(req, res)
send(req, req.url, opts).pipe(res)
} catch (err) {
res.statusCode = 500
res.end(String(err))
}
})
}
module.exports.shouldNotHaveBody = function shouldNotHaveBody (t) {
return function (res) {
t.ok(res.text === '' || res.text === undefined)
}
}