discourse/test/javascripts/controllers
Martin Brennan 7e303f9320
DEV: Upgrade sinon and fix time based bookmark tests (#9647)
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.
2020-05-07 09:10:32 +10:00
..
avatar-selector-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
bookmark-test.js DEV: Upgrade sinon and fix time based bookmark tests (#9647) 2020-05-07 09:10:32 +10:00
create-account-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
group-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
history-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
preferences-account-test.js FEATURE: Promote bookmarks with reminders to core functionality (#9369) 2020-04-22 13:44:19 +10:00
preferences-second-factor-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
reorder-categories-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
topic-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00