+5
-1
@@ -25,7 +25,11 @@ const status = (plan: string, remaining: number): QuotaStatus => ({
|
|||||||
|
|
||||||
test("built quota slot stays reactive across pending, empty, failure, update, and session states", async () => {
|
test("built quota slot stays reactive across pending, empty, failure, update, and session states", async () => {
|
||||||
await build();
|
await build();
|
||||||
const { default: plugin } = await import("../dist/tui.js");
|
// Resolve the built bundle at runtime; tsc runs before build creates dist/tui.js.
|
||||||
|
const tui: typeof import("../src/tui.js") = await import(
|
||||||
|
new URL("../dist/tui.js", import.meta.url).href
|
||||||
|
);
|
||||||
|
const { default: plugin } = tui;
|
||||||
const pending = Promise.withResolvers<QuotaStatus | null>();
|
const pending = Promise.withResolvers<QuotaStatus | null>();
|
||||||
const responses: Array<() => Promise<QuotaStatus | null>> = [() => pending.promise];
|
const responses: Array<() => Promise<QuotaStatus | null>> = [() => pending.promise];
|
||||||
const sessions: string[] = [];
|
const sessions: string[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user