Commit Graph

25 Commits

Author SHA1 Message Date
Kenta Moriuchi
4d4bd0eb92
refactor(archive,async,cli,csv,dotenv,encoding,expect,fmt,front-matter,fs,http,internal,log,net,path,semver,testing,text,webgpu,yaml): enable "exactOptionalPropertyTypes" option (#5892) 2024-09-04 14:15:01 +09:00
Ian Bull
73987a1772
refactor(testing): align additional error messages (#5810) 2024-08-26 14:22:16 +09:00
Asher Gomez
7fd14ba8d4
fix(testing): correct stub() error message (#5575) 2024-07-30 12:11:41 +09:00
Asher Gomez
33e17d579d
refactor(testing): improve error messages in mock module (part 2) (#5569) 2024-07-29 21:30:55 +10:00
Asher Gomez
1eb559fe9c
refactor(testing): improve error messages in mock module (#5549)
* refactor(testing): improve error messages in `mock` module

* work
2024-07-26 12:24:12 +09:00
Yoshiya Hinosawa
06d43901a8
fix(testing): correctly throw in constructor with spy() (#5139) 2024-06-26 16:32:08 +09:00
Yoshiya Hinosawa
876c20ffb9
refactor(testing): remove dead code and improve test of testing/mock.ts (#5137) 2024-06-25 18:32:50 +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
Kyle June
c6ed026ec4
feat(testing): explicit resource management for spy() and stub() (#4306)
* feat(testing): Explicit resource management for `spy()` and `stub()`

* Undo explicitly making FakeTime Disposable

* Update test cases to use explicit resource management

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-02-16 15:26:33 +11: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
Chiezo
21f9edc524
feat(testing/mock): enable spy to accept a class constructor (#3766) 2023-11-06 18:03:39 +09:00
Yoshiya Hinosawa
c54ab5f956
test(testing): use assert/mod.ts instead of testing/asserts.ts (#3652) 2023-09-20 13:57:44 +09:00
Yoshiya Hinosawa
400ba3a3dd
chore: update assertions following Deno.inspect change (#3345) 2023-05-01 08:28:36 +09:00
Miroslav Bajtoš
0d4bd3cb2e
feat(testing/asserts): include msg in assertion errors (#3253) 2023-03-20 15:23:09 +09:00
ayame113
b4239898d6
chore: update copyright header (#3082) 2023-01-03 19:47:44 +09:00
Asher Gomez
3b9fb39ddd
chore: remove void and Promise<void> return types (#2550) 2022-08-24 10:21:57 +09:00
Jesper van den Ende
996d7afd4d
feat(testing): allow for stubbing non existent instance methods (#2487) 2022-08-11 12:03:33 +09:00
Yoshiya Hinosawa
034c6e2833
test: fix unhandled promises in test cases (#2281) 2022-05-29 21:02:37 +09:00
Thomas Cruveilher
981dd90946
fix(assertRejects): fails on synchronous throw #1302 (#2234)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-05-18 13:48:18 +09: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
5f764b9499
feat(testing): add behavior-driven development (#2067) 2022-04-08 14:01:46 +09:00
Kyle June
7213d527ec
feat(testing): add mocking utilities (#2048) 2022-03-29 21:51:36 +09:00