From 8773f7ab6500534a17200e981f2866dbb54a0f81 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sat, 6 Dec 2025 19:58:21 -0800 Subject: [PATCH] Delete TODO.md --- TODO.md | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 TODO.md diff --git a/TODO.md b/TODO.md deleted file mode 100644 index ad3ba08ce2..0000000000 --- a/TODO.md +++ /dev/null @@ -1,51 +0,0 @@ -- [ ] issue-207.test.ts: update webkit to allow overridenDateNow to be negative. we will have to pick some other value to be none, eg NaN. - -- [ ] process.hrtime (same as performance.now, resets to [0, 0] when fake timers are enabled) -- [ ] decimal ticks should be supported: https://github.com/sinonjs/fake-timers/blob/main/test/issue-207-test.js -- [ ] what happens when you add negative time? - -- [ ] test abortsignal -- [ ] test spawnSync -- [ ] support performance.now -- [ ] support Date.now() -- [ ] support useFakeTimers in combination with setSystemTime -- [ ] support functions: - - [x] advanceTimersByTime - - [ ] advanceTimersByTimeAsync\* - - [x] advanceTimersToNextTimer - - [ ] advanceTimersToNextTimerAsync\* - - [ ] advanceTimersToNextFrame - - [x] getTimerCount - - [x] clearAllTimers - - [ ] getMockedSystemTime - - [ ] getRealSystemTime - - [ ] runAllTicks - - [x] runAllTimers - - [ ] runAllTimersAsync\* - - [x] runOnlyPendingTimers - - [x] make sure `[10, [20]], [30, [40]]` runs 10, 20, and 30 - - [ ] runOnlyPendingTimersAsync - - [ ] setSystemTime - - [x] useFakeTimers - - [x] isFakeTimers - - [x] useRealTimers -- [ ] the result of 'arm' ('.disarm'/'.rearm') seems to be ignored? both disarm and rearm? we should change it to return void if it's actually ignored - - [ ] we can make this change seperately in main -- [ ] see how fake timers works with setSystemTime -- [ ] handle the config argument for useFakeTimers - - vitest has the toFake parameter for enabling nextTick and queueMicrotask - - jets has a timerLimit parameter -- [ ] make sure there is no memory leak if you create a setTimeout/setInterval and clear or stop the fake timers before it fires repeatedly. -- [ ] audit the allowFakeTimers list (do we want subprocess timeouts to count? and others) - - we will also need some timespec.now() calls to exclude mocked time, ie `timespec.nowUnmocked()` - - since test timeouts must be unmocked, we need BunTest timeouts to use unmocked time - - [ ] audit all timespec.now() calls to replace some with timespec.nowUnmocked() -- [ ] add a test that fake timers do not break test duration calculations -- [ ] test the order of '0' timeouts, decide if we will match or not - - [ ] consider supporting edge-case where `timeout0(A, timeout0(B)), timeout0(C)` prints `A=0, C=0, B=1` (date.now()) -- [ ] \* support async functions (maybe defer these for later? the first PR does not need to have everything. we can stub the unimplemented functions.) -- [ ] add types for all functions -- [ ] add docs for all functions (at minimum: documentatino comments in the types) -- [ ] determine which tags should have timer-faking enabled (eg should subprocess timeout? probably not but maybe) -- [ ] find real projects using fake timers, see if they work -- [ ] make sure we match jest fake timers also