import test from 'node:test' import assert from 'node:assert/strict' import { loadModule } from './load.mjs' const { createRequestGuard } = await loadModule('src/lib/requestGuard.js') test('nur die jüngste Anfrage gilt', () => { const g = createRequestGuard() const a = g.next(); const b = g.next() assert.equal(g.isCurrent(a), false) assert.equal(g.isCurrent(b), true) })