mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 08:03:40 +08:00
7e303f9320
Update sinon.js to 9.0.2 to access async fake timers https://sinonjs.org/releases/v9.0.2/fake-timers/ which can then be used with acceptance tests (previously useFakeTimers didn't work with await, e.g. for visit). Fix the bookmark acceptance test that was time based to use these new fake timers. Add a fakeTime function that uses moment and the provided date string + timezone to freeze time using useFakeTimers and return a clock. Add a timeStep function that accepts a clock from fakeTime and a function to run. Once the function is run we call clock.tickAsync(1000) to progress the fake clock forward 1s to progress promises/callbacks. |
||
---|---|---|
.. | ||
avatar-selector-test.js | ||
bookmark-test.js | ||
create-account-test.js | ||
group-test.js | ||
history-test.js | ||
preferences-account-test.js | ||
preferences-second-factor-test.js | ||
reorder-categories-test.js | ||
topic-test.js |