fix(tests): improve test reliability and remove unused deps

- Add --test-timeout=30000 to prevent test suite hanging
- Skip build_verification.test.mjs when dist/ is absent
- Replace setTimeout with mocked Date.now in memory-cache expiry test
- Replace wait(30) with setImmediate flush in scheduler smoke test
- Remove unused @playwright/test devDependency

https://claude.ai/code/session_01GfwUNbgeMgXreFDbsNQMsS
This commit is contained in:
Claude committed 2026-02-19 20:55:17 +00:00
1 parent e7ecd2617e
commit c9b23874f2
4 files changed
+25 -12

No files matched your search

+7 -2
View File
@@ -15,7 +15,12 @@ import {
SYNTHETIC_EVENTS,
} from './fixtures/memory-fixtures.js';
const wait = (ms = 0) => new Promise((resolve) => setTimeout(resolve, ms));
/** Drain the async job queue without wall-clock dependency. */
const flushAsync = async () => {
for (let i = 0; i < 10; i++) {
await new Promise((resolve) => setImmediate(resolve));
}
};
const withMockedNow = async (now, run) => {
const originalNow = Date.now;
@@ -265,7 +270,7 @@ test('scheduler smoke test handles mocked clock and lock contention', async () =
},
});
await wait(30);
await flushAsync();
scheduler.stop();
});