discourse/test/javascripts/lib
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
..
bbcode-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
break-string-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
category-badge-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
click-track-edit-history-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
click-track-profile-page-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
click-track-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
computed-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
discourse-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
emoji-store-test.js DEV: Fix some more flaky tests (#9384) 2020-04-08 12:46:43 +02:00
emoji-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
formatter-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
highlight-search-test.js.es6 FIX: remove word boundary regex (\b) for search result highlights. (#9338) 2020-04-15 11:11:00 +05:30
i18n-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
icon-library-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
key-value-store-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
link-mentions-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
load-script-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
oneboxer-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
preload-store-test.js DEV: Move `preload-store` to `discourse/lib/preload-store` 2020-05-06 15:28:06 -04:00
pretty-text-test.js FIX: Quoting posts (#9378) 2020-04-08 16:28:23 +02:00
sanitizer-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
screen-track-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
search-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
sharing-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
text-direction-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
to-markdown-test.js UX: strip base64 image URLs when converting HTML to markdown. 2020-04-12 21:05:23 +05:30
tooltip-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
upload-short-url-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
uploads-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
url-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
user-search-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00
utilities-test.js UX: Improve second factor UI (#9526) 2020-05-05 11:05:25 +10:00
white-lister-test.js Retry: Rename all test files from JS -> ES6 2020-03-26 12:25:46 -04:00