Commit Graph

19 Commits

Author SHA1 Message Date
Asher Gomez
3f318935c9
refactor(testing): improve FakeTime error messaging (#5533)
* refactor(time): improve `FakeTime` error messaging

* fix

* fix
2024-07-24 15:48:23 +09:00
Milly
55297e90a8
fix(testing): FakeTime fakes AbortSignal.timeout (#5500)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-07-22 13:07:48 +09:00
Yoshiya Hinosawa
40bf2a57b4
test(testing): improve FakeTime testing (#5123) 2024-06-25 15:51:24 +09:00
Yoshiya Hinosawa
3204a708a5
BREAKING(testing): disable multiple FakeTime creations (#5130) 2024-06-25 14:15:25 +09:00
Yoshiya Hinosawa
61a39ce146
fix(testing): function call of Date constructor is not correctly faked (#5122) 2024-06-25 08:35:53 +09:00
Yoshiya Hinosawa
3155f0050a
chore: switch to JSR-oriented codebase (#4650) 2024-04-29 11:57:30 +09:00
Asher Gomez
bfefdd713d
test(testing): correct test names (#4585) 2024-04-15 16:39:17 +10:00
David Sherret
ef6b95f0c7
refactor: make the code work under verbatimModuleSyntax (#4406)
* Start

* Update

* Format

* Revert deno.json change

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-02-27 21:57:25 +00:00
Simon Holloway
0858ff8287
refactor(testing): prepare for noUncheckedIndexedAccess (#4084)
* refactor(testing): prepare for noUncheckedIndexedAccess

* tweaks

* fix(testing): returnsArg throws when no arg at index

* refactor(testing): sessions to use .at(-1) to get last item

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>

* non-null after check

* swap non-null assertions for as const

* proper error message

* more as const in the mock_test file

* fix tests for new behaviour

* tweak

* revert returnsArg handling back to `| undefined`

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-05 09:26:55 +11:00
Lino Le Van
c46143f0ac
chore: update copyright year (#4046)
* chore: update copyright year

* fix

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-02 08:11:32 +11:00
Simon Holloway
f712403cb1
feat(testing): enable the using keyword on FakeTime() (#3961)
* feat(testing): enable the "using" keyword on FakeTime

* chore(testing): update all tests with using FakeTime

* chore(testing): formatting fix
2023-12-15 07:47:50 +11:00
Yoshiya Hinosawa
c54ab5f956
test(testing): use assert/mod.ts instead of testing/asserts.ts (#3652) 2023-09-20 13:57:44 +09:00
Milly
d48fe6101b
fix(testing/time): fix FakeTime.next to return false if all timers are cleared (#3638) 2023-09-14 19:16:59 +09:00
Milly
bca446e181
fix(testing/time): fix FakeTime.restoreFor accuracy for sync callbacks (#3531) 2023-08-14 18:33:35 +09:00
Luca Casonato
7e67e2668f
fix(testing/time): use real Date in FakeTime (#3414) 2023-06-10 19:56:34 +09:00
ayame113
b4239898d6
chore: update copyright header (#3082) 2023-01-03 19:47:44 +09:00
Jesper van den Ende
11b2b7f7f7
BREAKING(testing/asserts): remove implicit any types from assert signatures. (#2203) 2022-05-20 14:08:49 +02:00
Jesper van den Ende
c258af35ad
feat(testing): infer stub and spy return types from properties (#2137) 2022-04-26 22:34:42 +09:00
Kyle June
403f226a20
feat(testing): add utility for faking time (#2069)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-04-14 15:29:17 +09:00