Commit Graph

32 Commits

Author SHA1 Message Date
IgorM867
6cc4f9fc44
feat(testing/unstable): support for stubbing properties (#6128)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-10-31 20:54:32 +09:00
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
Asher Gomez
82f49dc91d
chore(testing): remove redundant constructor examples (#5515) 2024-07-23 12:07:53 +09:00
Asher Gomez
375e914050
refactor(expect,testing): update @std/assert imports (#5242) 2024-07-02 14:07:46 +10:00
Asher Gomez
d102a10235
refactor(assert,async,bytes,cli,collections,crypto,csv,data-structures,datetime,dotenv,encoding,expect,fmt,front-matter,fs,html,http,ini,internal,io,json,jsonc,log,media-types,msgpack,net,path,semver,streams,testing,text,toml,ulid,url,uuid,webgpu,yaml): import from @std/assert (#5199)
* refactor: import from `@std/assert`

* update
2024-06-30 08:30:10 +00: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
635e062330
docs(testing): improve the docs of @std/testing (#5033)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-06-17 11:31:31 +09:00
Asher Gomez
c5ad9d48dc
docs(cli,encoding,fmt,jsonc,path,semver,testing,text,toml,url): remove "This module is browser compatible" note (#4945) 2024-06-04 13:21:54 +10:00
Yoshiya Hinosawa
3155f0050a
chore: switch to JSR-oriented codebase (#4650) 2024-04-29 11:57:30 +09:00
Gabriele Belluardo
2990aa6de5
chore: enable single-var-declarator lint rule (#4488) 2024-03-14 22:18:00 +11: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
Asher Gomez
756f87eea7
refactor(testing): minor cleanups (#3963) 2023-12-18 19:04:31 +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
Asher Gomez
69d1b0d2f1
chore(testing): remove examples (#3833) 2023-11-22 18:39:15 +11:00
Chiezo
21f9edc524
feat(testing/mock): enable spy to accept a class constructor (#3766) 2023-11-06 18:03:39 +09:00
ud2
159060b15c
perf: repoint internal imports to single-export files (#3537) 2023-08-14 16:08:42 +09:00
Asher Gomez
239e85ad6a
BREAKING(testing, assert): move std/testing/asserts to std/assert (#3445) 2023-07-13 16:04:30 +09:00
ayame113
b4239898d6
chore: update copyright header (#3082) 2023-01-03 19:47:44 +09:00
Leo Kettmeir
aba5017d43
docs: reorganize docs (#2658) 2022-11-25 12:40:23 +01:00
Asher Gomez
3b9fb39ddd
chore: remove void and Promise<void> return types (#2550) 2022-08-24 10:21:57 +09:00
Kitson Kelly
e83306672e
docs: improve module documentation (#2511) 2022-08-11 21:51:20 +10:00
Jesper van den Ende
996d7afd4d
feat(testing): allow for stubbing non existent instance methods (#2487) 2022-08-11 12:03:33 +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