Skip to content

Commit 01c1aba

Browse files
committed
Await async getAnnotations() in test
The test was not awaiting the Promise returned by the async getAnnotations() method. This passed on Deno by coincidence, but failed on Node.js because its test runner attaches internal AsyncLocalStorage symbols to Promise objects, causing Object.getOwnPropertySymbols() to return 2 instead of 0.
1 parent cc782ee commit 01c1aba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/config/src/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ describe("createConfigContext", () => {
3434
assert.equal(typeof context.getAnnotations, "function");
3535
});
3636

37-
test("returns empty annotations when called without parsed result", () => {
37+
test("returns empty annotations when called without parsed result", async () => {
3838
const schema = z.object({
3939
host: z.string(),
4040
});
4141

4242
const context = createConfigContext({ schema });
43-
const annotations = context.getAnnotations();
43+
const annotations = await context.getAnnotations();
4444

4545
assert.ok(annotations);
4646
assert.deepEqual(Object.getOwnPropertySymbols(annotations).length, 0);

0 commit comments

Comments
 (0)