1import assert from "node:assert/strict";2import test from "node:test";34import { allocateAddress } from "../src/db.ts";56test("app reservations count as permanently occupied allocator slots", async () => {7 const addresses = Array.from({ length: 4096 }, (_, id) => ({ address: (15 << 12) | id }));8 const env = {9 DB: {10 prepare() {11 return {12 bind() {13 return { all: async () => ({ results: addresses }) };14 },15 };16 },17 },18 };1920 await assert.rejects(() => allocateAddress(env, 15), /vault is full/);21});