download
raw
450 Bytes
'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)
})

Xet Storage Details

Size:
450 Bytes
·
Xet hash:
42ebd6b9fe09714ac202c7e4870baf96d21814884ade0aceaebf357b875dc282

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.