198 Commits

Author SHA1 Message Date
Anthony Fu
4673589125 chore: release script 2022-05-03 01:33:26 +08:00
Anthony Fu
76c389497c feat: test.skipIf and test.runIf apis 2022-05-02 23:48:14 +08:00
Anthony Fu
317766f70f chore: apply lint 2022-05-02 23:12:20 +08:00
Yuyao Nie
d09de8f29a
fix: diff output is incorrectly when using expect.any (#1197) 2022-05-02 23:07:40 +08:00
Carlos Rodrigues
4956713a77
fix: self exported module call stack error (#1221)
* fix: self exported module call stack error

* remove warning
2022-05-01 16:34:19 +00:00
snowingfox
0e95cc8114
chore: correct typo (#1199) 2022-04-27 16:02:56 +02:00
Anthony Fu
4f198ef284
feat: test context (#900)
* feat: support concurrent snapshot
* feat: cleanup callback for `beforeAll` and `beforeEach`
2022-04-25 21:52:25 +08:00
Anthony Fu
713c870a55 chore: lint 2022-04-25 19:44:30 +08:00
Gustavo Bissolli
95b1ba4c17
fix: types for EachFunction are missing awaitable return (fix: #1181) (#1182) 2022-04-22 18:46:05 +08:00
Vladimir
065fe0edeb
test: fix timers resetting in tests (#1177)
* test: fix timers resetting in tests

* chore: don't format json files
2022-04-21 22:02:56 +08:00
Shinigami
7dbd837661
feat: add satisfy alias (#1172)
* feat: add satisfy alias

* test: add toSatisfy test
2022-04-20 22:20:46 +08:00
Vladimir
eb13d34c0a
feat: add vi.resetModules (#1102) 2022-04-07 02:49:43 +08:00
Vladimir
5cc592be97
feat: add resolveSnapshotPath option (#1101) 2022-04-05 18:04:33 +08:00
Vladimir
6f552751df
fix: don't reexport vi utils from vitest (#1100) 2022-04-05 18:04:08 +08:00
Vladimir
668015277f
fix: typescript allows new Spy, add lastCall support for spy (#1085) 2022-04-03 18:41:03 +08:00
Vladimir
15829489eb
feat: stubGlobals helper (#1079) 2022-04-03 00:10:50 +08:00
Vladimir
a880d3f17a
fix: event target mismatch with global event (#1036)
* fix: event target mismatch with global event

* test: dom doesn't throw

* chore: cleanup
2022-03-27 17:11:31 +08:00
Dewey Ou
4210c39122
feat: add parameter for test name of each (#1031)
* feat: add parameter for test name of each api

* fix: each test name escaped case

* fix: add a judgment
2022-03-26 20:12:06 +08:00
Dewey Ou
f52cd934ca
fix: assertions error message (#1027) 2022-03-25 15:03:13 +08:00
Anthony Fu
8a25a787d0
feat: new setupOnce utils (#967) 2022-03-18 01:05:21 +08:00
Vladimir
980e00badc
test: don't run 500 stub tests in CI (#912)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-03-16 23:00:59 +00:00
Vladimir
73753475f5
feat: web worker support (#726)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-03-16 22:58:41 +00:00
Kalven Schraut
7b983445a8
fix(vite-node): normalize relative paths to be from current working directory (#952) 2022-03-17 06:39:38 +08:00
Anthony Fu
067d59c397 chore: clean up 2022-03-16 17:32:31 +08:00
Anthony Fu
51c2058242 feat: group sync console.log calls with macro task 2022-03-16 17:31:58 +08:00
Kalven Schraut
1c6ffcac28
fix: add Module symbol to export object (#951) 2022-03-16 15:39:16 +08:00
Kalven Schraut
e3a7ff3c4f
fix(expect): toHaveProperty support array syntax like jest (fix #937) (#938) 2022-03-15 06:20:14 +01:00
Gabriel Alves
6ca857ba28
feat: add optional generic on array containing (#935) 2022-03-14 08:57:32 +08:00
Vladimir
086a77c690
feat: create asymmetric matchers when extending expect (#934) 2022-03-14 06:31:50 +08:00
Yoshiaki Togami
2b9b1aea5d
test: add test for expect.extend (#882) 2022-03-13 15:52:58 +03:00
Vladimir
094d23ebff
fix: resolve dynamicly imported modules to be the same as statically (#911) 2022-03-09 15:21:28 +08:00
Vladimir
78e66ff25b
test: add test case for reassigning NODE_ENV (#789)
* test: add test case for reassigning NODE_ENV

* chore: reset NODE_ENV

* Update env.test.ts
2022-03-08 18:18:33 +03:00
翠 / green
cb5994bf6a
fix: passing non array to reporters option did not effect (#878) 2022-03-01 13:32:39 +08:00
Vladimir
ceb41ae3f4
fix: enable strict mode by default (#865) 2022-02-28 04:11:12 +08:00
M. Bagher Abiat
c161a44828
fix: improve types of test.each (#840)
* init

* fix: test instead of suite

* chore: rever format changes

* chore: update

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-02-23 22:31:07 +08:00
Vladimir
600ca80bec
fix: process "data:" in import correctly (#823) 2022-02-21 13:59:06 +08:00
Vladimir
e37f4deb4f
fix: resolve import path for dynamic imports (#817) 2022-02-21 13:19:23 +08:00
Yoshiaki Togami
2e1e9c3d42
fix: add check to avoid converting 0 to undefined (#802) 2022-02-19 19:50:36 +01:00
Vladimir
c98355aa65
fix: set mode before running Vite (#775) 2022-02-18 11:20:08 +08:00
Vladimir
15ea3a3c00
feat: allow reassigning define globals (#769) 2022-02-18 11:19:19 +08:00
Vladimir
1623b3c985
fix: put envs from .env files on process.env (#770)
Co-authored-by: patak <matias.capeletto@gmail.com>
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-02-17 08:24:17 +00:00
Vladimir
6d19bf732f
fix: fix error if toMatchInlineSnapshot is called on resolves/rejects (#773) 2022-02-17 16:18:15 +08:00
Vladimir
b656f8dc37
feat: add VITEST_WORKER_ID env (#774) 2022-02-17 16:16:24 +08:00
Shinigami
5e2324f4bd
feat: add typeof assertion (#762)
Co-authored-by: Vladimir <sheremet-va@users.noreply.github.com>
2022-02-16 14:08:14 +08:00
Yoshiaki Togami
d1df0e0090
feat: support BigInt for jest assertions (#742) 2022-02-13 20:43:01 +01:00
Anthony Fu
fb13e7ae5e test: add more test 2022-02-12 15:27:28 +08:00
Jonathan
73d36dcb42
feat: support readonly tuples as input to .each (#733) 2022-02-11 22:18:48 +08:00
Jan Müller
92fb244e72
fix: do not merge arrays (fix #725) (#728) 2022-02-11 10:44:20 +08:00
Anthony Fu
262354343e feat: support custom literal tag on inlineSnapshot 2022-02-10 15:44:53 +08:00
Vladimir
5f007889bb
feat: allow changing import.meta.env (#714) 2022-02-10 00:52:55 +08:00