Commit Graph

356 Commits

Author SHA1 Message Date
Asher Gomez
b5f9e3446c
refactor(testing): remove FakeTime.start setter (#5050)
* BREAKING(testing): remove `FakeTime.start` setter

* note

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-06-18 14:36:51 +10:00
denobot
cea0a14578
chore: release 2024.06.17 (#5062)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-06-17 18:53:28 +09:00
Asher Gomez
935d665713
refactor(testing): remove use of public keyword (#5051) 2024-06-17 15:11:31 +12: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
denobot
0ea4868542
chore: release 2024.06.06 (#4984)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-06-06 20:26:57 +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
denobot
b9374d3715
chore: release 2024.06.03 (#4935)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-06-03 15:44:03 +09:00
Asher Gomez
8b24cc7a40
BREAKING(assert,testing): remove formatter option from assertEquals() (#4893) 2024-06-03 13:37:07 +10:00
Yoshiya Hinosawa
44bc90065b
refactor(testing): do not use assertEquals in snapshot.ts (#4930) 2024-06-02 19:28:31 +09:00
David Sherret
4a7f38339e
chore(expect): fix future no-slow-type lint errors with expando properties (#4711)
* chore: fix future fast check errors with expando properties

* spelling

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-05-13 08:29:05 +10:00
Yoshiya Hinosawa
3155f0050a
chore: switch to JSR-oriented codebase (#4650) 2024-04-29 11:57:30 +09:00
Michael Herzner
f5f9ca9207
test(crypto): improve test coverage (#4620)
* test(crypto): improve test coverage

* chore: implement review remarks

* fix types incompatible with @types/node

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-04-23 08:37:50 +10:00
Asher Gomez
3f9d4a8494
chore: simplify deprecation notice check (#4577) 2024-04-17 15:36:50 +09:00
Asher Gomez
bfefdd713d
test(testing): correct test names (#4585) 2024-04-15 16:39:17 +10:00
Asher Gomez
44660eaf1f
test(testing): cleanup bdd tests (#4565) 2024-04-10 20:56:00 +09:00
Marvin Hagemeister
6cc097b621
feat(testing): add after, before, test aliases (#4541)
* feat(testing): add `after`, `before`, `test` aliases

* fix: jsdoc links
2024-04-02 12:53:27 +02:00
Gabriele Belluardo
2990aa6de5
chore: enable single-var-declarator lint rule (#4488) 2024-03-14 22:18:00 +11:00
Yoshiya Hinosawa
45f7a6b460
chore(testing): update snapshot testing expectations (#4416) 2024-02-29 21:38:35 +09: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
David Luis
ad4abccb66
docs: replace markdown hyperlink syntax with {@link} tag where necessary. (#4253)
docs: replaces markdown hyperlink syntax with `{@link}` tag when necessary.
2024-02-01 09:19:46 +11:00
Asher Gomez
805b926032
fix: add --no-lock to spawned process args in tests (#4168) 2024-01-12 13:38:41 +09:00
Asher Gomez
cbea77eba0
docs(testing): fix assertion deprecation notices (#4122) 2024-01-08 13:17:03 +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
733b60e4b2
chore(fmt): replace stripColor() use with stripAnsiCode() (#3902) 2023-12-06 17:58:42 +11:00
Asher Gomez
69d1b0d2f1
chore(testing): remove examples (#3833) 2023-11-22 18:39:15 +11:00
Asher Gomez
7d5344d775
docs: improve deprecation notices (#3804) 2023-11-16 05:33:11 +11:00
Asher Gomez
255a3765d3
feat: std/data_structures (#3734) 2023-11-15 21:17:44 +11:00
Chiezo
21f9edc524
feat(testing/mock): enable spy to accept a class constructor (#3766) 2023-11-06 18:03:39 +09:00
Asher Gomez
c4236a34c7
refactor: move unstable std/collections files (#3700) 2023-10-18 10:24:46 +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
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
Yoshiya Hinosawa
8229b6f248
BREAKING(collections): move RedBlackTree, BinarySearchTree, and BinaryHeap to 'unstable' subdir (#3628) 2023-09-12 16:26:57 +09:00
Hirotaka Tagawa / wafuwafu13
51cfcb65d8
fix(testing/snapshot): distinguish between singular and plural forms (#3625) 2023-09-06 11:02:45 +09:00
Lino Le Van
2b5d71224f
refactor: cleanup usage of double equals (#3566)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-08-25 18:04:43 +09:00
Yoshiya Hinosawa
ee6856c2ed
refactor: move _util/diff to assert/_diff (#3563) 2023-08-23 16:45:32 +09:00
Milly
bca446e181
fix(testing/time): fix FakeTime.restoreFor accuracy for sync callbacks (#3531) 2023-08-14 18:33:35 +09:00
ud2
159060b15c
perf: repoint internal imports to single-export files (#3537) 2023-08-14 16:08:42 +09:00
Yoshiya Hinosawa
5be01a0931
BREAKING(testing/snapshot): fix regression of serialization of long strings (#3507) 2023-07-29 18:30:50 +09:00
Hirotaka Tagawa / wafuwafu13
428154a3dd
BREAKING(testing/snapshot): change tab char serialization (#3447)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-07-29 18:24:09 +09:00
Dan Rose
bafcd2429d
docs(testing): fix typo in std/testing/asserts.ts deprecation message (#3497) 2023-07-23 17:37:19 +09:00
Asher Gomez
239e85ad6a
BREAKING(testing, assert): move std/testing/asserts to std/assert (#3445) 2023-07-13 16:04:30 +09:00
Jacob Avery
4026c52a01
fix(testing/asserts): handle primitive/null values better in assertObjectMatch (#3468) 2023-06-30 17:38:26 +09:00
Yoshiya Hinosawa
3e2bdffbbf
chore: fix lint errors (#3470) 2023-06-28 17:06:55 +09:00
Martin Fischer
a5b1d80736
chore: fix typos (#3458)
The typos were found with the typos[1] spell checker.  That spell
checker will be incorporated into the CI in a followup PR.

[1]: https://github.com/crate-ci/typos
2023-06-22 01:27:37 +09:00
Luca Casonato
7e67e2668f
fix(testing/time): use real Date in FakeTime (#3414) 2023-06-10 19:56:34 +09:00
Hirotaka Tagawa / wafuwafu13
d3e48570ab
feat(testing): report the number of removed snapshots (#3435) 2023-06-10 19:02:09 +09:00
Jean-David Daviet
1ec581bf7e
docs(testing): update fast-check integer method (#3428) 2023-06-07 21:37:55 +09:00
Hirotaka Tagawa / wafuwafu13
d42db5ba90
refactor(testing): remove unnecessary context processing in snapshot teardown (#3422) 2023-06-07 14:05:47 +09:00
Yoshiya Hinosawa
400ba3a3dd
chore: update assertions following Deno.inspect change (#3345) 2023-05-01 08:28:36 +09:00
Marvin Hagemeister
c224ce4753
feat(testing): add .skip alias to bdd test API (#3300) 2023-04-13 12:30:04 +09:00
Yuki Tanaka
18b171468b
chore(testing): update __snapshots__/snapshot_test.ts.snap (#3271) 2023-03-21 21:35:48 +09:00
Miroslav Bajtoš
0d4bd3cb2e
feat(testing/asserts): include msg in assertion errors (#3253) 2023-03-20 15:23:09 +09:00
Geert-Jan Zwiers
69556068c7
chore: remove powershell note in snapshot docs (#3205) 2023-02-17 09:54:40 -05:00
ayame113
ba0b6317de
test: update test cases according to swc updates (#3188) 2023-02-12 12:12:12 +09:00
denobot
1756b160fa
0.174.0 (#3135)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-25 23:25:19 +01:00
ayame113
b4239898d6
chore: update copyright header (#3082) 2023-01-03 19:47:44 +09:00
Kamil Ogórek
4db14f6ccf
fix(testing): do not mutate tokens when creating details (#3049) 2022-12-25 20:44:51 +09:00
Asher Gomez
c78061eef3
refactor: replace String.prototype.substr() with String.prototype.slice() (#2993) 2022-12-12 15:21:59 +09:00
Asher Gomez
6c2e01e6b8
refactor: replace use of Deno.spawnChild and Deno.run with Deno.Command (#2912)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-11-30 14:12:34 +09:00
Lino Le Van
34d5f7a032
feat(testing): add conditional type check utils (#2864)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-11-28 21:05:51 +09:00
Leo Kettmeir
aba5017d43
docs: reorganize docs (#2658) 2022-11-25 12:40:23 +01:00
Asher Gomez
b72d3eb42a
refactor: replace Deno.spawn with Deno.Command (#2886) 2022-11-15 15:00:59 +09:00
ayame113
e6189c08e9
docs: Using absolute paths in jsdoc import statements (#2762) 2022-10-10 10:05:56 -04:00
Asher Gomez
bddda3c473
chore: remove deprecated APIs across collections, streams, textproto and uuid (#2720) 2022-09-30 16:27:11 +09:00
Asher Gomez
40d0466e46
chore(testing/bench): remove deprecated APIs (#2714) 2022-09-29 11:27:10 -04:00
Asher Gomez
b9f9caa7be
chore(collections): remove deprecated APIs (#2711) 2022-09-29 11:24:28 -04:00
Chris Chua
b7b7d76db1
fix: testing example pages failing to load (#2693)
These pages were erroring out on loading due to the use of "ignored" language.
2022-09-25 09:26:31 +02:00
Tim Reichen
2f7713a164
chore(tools): add deprecation check (#2613) 2022-09-15 16:06:04 +09:00
Yoshiya Hinosawa
eab5437413
fix(testing/asserts): temporarily disable background colors in diff (#2601) 2022-09-02 20:29:59 +09:00
Michael Gibson
e4f76568a6
fix(fs): use Deno.errors.AlreadyExists where appropriate (#2547) 2022-08-31 16:04:53 +09:00
Asher Gomez
fa6c014902
feat(testing): better assertFalse types (#2562) 2022-08-25 14:57:40 +09:00
Asher Gomez
f6bc3682df
feat(testing): better assertNotInstanceOf types (#2558)
Thanks @harrysolovay for the idea
2022-08-25 14:53:20 +09:00
Asher Gomez
3b9fb39ddd
chore: remove void and Promise<void> return types (#2550) 2022-08-24 10:21:57 +09:00
Yoshiya Hinosawa
d7fa0016c3
ci: fix browser type checking (#2549) 2022-08-23 19:06:52 +09:00
Asher Gomez
30f771dd17
feat(testing/asserts): add assertNotInstanceOf (#2530) 2022-08-18 16:29:57 +09:00
cuobiezi
2e7f2f521c
fix(testing): better assertEqual diff for object getters (#2509) 2022-08-12 15:06:52 +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
denobot
8379497298
0.151.0 (#2497) 2022-08-04 21:48:15 +02:00
Benjamin Fischer
66671c4495
fix(testing): add support for PromiseLike in assertRejects (#2443)
Fixes #2442
2022-07-17 09:01:14 +10:00
David Sherret
5cf22ead6b
chore: workaround swc emit issues (#2439) 2022-07-13 09:15:32 -04:00
Yoshiya Hinosawa
6728c574c1
docs(testing): add note about powershell usage (#2414) 2022-07-04 15:37:35 +09:00
Ben Heidemann
583554de46
feat: add createAssertSnapshot (#2403) 2022-07-02 18:24:42 +09:00
Colin Ihrig
f09d03143b
fix(testing): break out of Set equality check on match (#2394)
This commit updates the equality checking logic of Sets to
break out of an inner loop when a match occurs. Prior to this
commit, it was possible to perform too many comparisons, which
incorrectly made a counter in the code go below zero.

Fixes: https://github.com/denoland/deno_std/issues/2295
2022-06-27 17:15:59 -04:00
Kyle June
500ec9de4b
fix(testing/bdd): fix flat test grouping context (#2308) 2022-06-20 09:12:15 +09:00
denobot
55addb3ad1
0.144.0 (#2351)
* 0.144.0

* fix(Releases.md): update note about collections/mod.ts

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>

* chore: fix formatting

* fix(tests): use `Deno.currentExe()` instead of `"deno"`

Co-authored-by: aslilac <aslilac@users.noreply.github.com>
Co-authored-by: Kayla Washburn <mckayla@hey.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-15 16:05:49 -06:00
David Sherret
6303f047cc
chore(canary): update snapshot tests based on latest canary (#2347) 2022-06-14 20:53:42 -04:00
cuobiezi
4c1e1bff7c
fix: assertSnapshot errors on empty snapshot in non-update mode (#2269) 2022-05-30 15:21:05 +02:00
Yoshiya Hinosawa
f44696c5ef
docs(testing): improve docs of assertThrows and assertRejects (#2282) 2022-05-29 21:05:52 +09:00
Yoshiya Hinosawa
034c6e2833
test: fix unhandled promises in test cases (#2281) 2022-05-29 21:02:37 +09:00
Mark Ladyshau
1bba810b48
refactor: replace TS private with private identifiers (#2272) 2022-05-27 21:27:13 +09:00
Leo Kettmeir
852968f631
refactor: switch the Deno.spawn (#2161) 2022-05-25 11:08:27 +02:00
Mark Ladyshau
662f27ce84
feat(testing/asserts): return error from assertRejects and assertThrows (#2226)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-05-25 17:51:42 +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
Colin Ihrig
f6ce58db39
BREAKING(testing): use Object.is() for strict equality (#2244)
This commit updates assertStrictEquals(), assertAlmostEquals(),
and assertNotStrictEquals() to use Object.is() instead of the
=== operator. The reason is that Object.is() better matches
user expectations of an assertion library in a couple edge
cases. It also better aligns with the behavior of at least one
other runtime's assertion library (Node.js).

Fixes: https://github.com/denoland/deno_std/issues/2151
2022-05-19 14:43:42 -04: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