Aktueller Stand

This commit is contained in:
2026-01-22 22:22:48 +01:00
parent 33e2bc61e2
commit fa5f3808bb
169 changed files with 58567 additions and 25460 deletions

View File

@@ -0,0 +1,18 @@
'use strict'
const { test } = require('node:test')
const Fastify = require('fastify')
const rateLimit = require('../index')
test('Fastify close on local store', async (t) => {
t.plan(1)
const fastify = Fastify()
await fastify.register(rateLimit, { max: 2, timeWindow: 1000 })
let counter = 1
fastify.addHook('onClose', (_instance, done) => {
counter++
done()
})
await fastify.close()
t.assert.deepStrictEqual(counter, 2)
})