274 Commits

Author SHA1 Message Date
Ari Perkkiö
a90d64fee3
feat!: remove @vitest/coverage-c8 package (#3614) 2023-07-11 11:46:41 +02:00
Vladimir
9608bf72d8
feat!: transformMode affects only test files, not regular files (#3491) 2023-07-11 10:56:13 +02:00
Anjorin Damilare
a77afffa83
chore(ui): update UI vue version (#3575)
Co-authored-by: userquin <userquin@gmail.com>
Co-authored-by: Vladimir <sleuths.slews0s@icloud.com>
2023-07-11 09:45:51 +02:00
Vladimir
6ad8ff6213
chore: update svelte example (#3684) 2023-06-27 18:07:45 +02:00
Joaquín Sánchez
445a7b6d4a
docs: switch to local search (#3594) 2023-06-20 17:52:17 +02:00
Vladimir
0cbb07b404
fix(vite-node): correctly resolve virtual modules (#3544) 2023-06-15 10:12:33 +02:00
Vladimir
c1004e1493
fix(mocker)!: don't restore mock to the original if module is mocked (#3518) 2023-06-06 19:00:24 +02:00
Dunqing
50f0700d24
fix(vite-node): circular import stuck (#3480) 2023-06-06 17:44:31 +02:00
Vladimir Sheremet
b6c4a6ca3b Revert "feat!: remove transformMode option"
This reverts commit 7983d53752f33ce78447d84f9a4dd78a9bd4d5f5.
2023-06-01 16:46:16 +02:00
Vladimir Sheremet
7983d53752 feat!: remove transformMode option 2023-06-01 16:45:22 +02:00
Vladimir
03d34249ac
revert: "fix(vite-node): circular import stuck" #3418 (#3479) 2023-05-31 16:18:08 +02:00
Alessandro Di Dio
b3602bcc4d
feat(dev): add moduleDirectories option to the vitest config (#3337)
Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
2023-05-30 10:13:10 +02:00
Vladimir Sheremet
56b99275b2 chore: move sourcamp test out of examples 2023-05-25 17:35:41 +02:00
rxliuli
02dc9ea7fc
fix(vite-node): don't remove sourcemap string in source code (#2918) (#3379)
Co-authored-by: Vladimir <sleuths.slews0s@icloud.com>
2023-05-25 11:53:32 +02:00
Dunqing
632eef4037
fix(vite-node): circular import stuck (#3418) 2023-05-24 15:46:08 +02:00
Vladimir
d1afd26216
fix: don't restore methods in automocked dependencies (#3438) 2023-05-24 09:15:33 +02:00
patak
4a807df37b
chore: update StackBlitz initialPath (#3356) 2023-05-11 16:11:37 +02:00
renovate[bot]
48c4e8c68b
chore(deps): update all non-major dependencies (#3238)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
2023-05-04 08:18:01 +02:00
Vladimir
0c09a40d2b
feat!: update mock implementation to support ESM runtime, introduce "vi.hoisted" (#3258) 2023-04-27 15:04:05 +02:00
Vladimir
ddfeb0cfff
chore: update pnpm (#3211) 2023-04-19 10:19:55 +02:00
Oriol
31f835f156
docs: updated "vi.mock" documentation link (#3198) 2023-04-15 10:54:27 +02:00
renovate[bot]
0f86ff9897
chore(deps): update all non-major dependencies (#2766)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
2023-04-06 16:53:03 +02:00
Vladimir
fcd2df2c23
refactor: update errors (#2816)
* perf: bypass source map handling, when using "resolves"/"rejects"

* chore: revert snapshot improvements

* test: fix test

* chore: fix initialization

* chore: fix snapshot
2023-02-11 16:53:41 +01:00
Vladimir Sheremet
0b3249e760 chore: update vitesse example 2023-02-11 13:56:23 +01:00
Vladimir Sheremet
f22ca93f4d chore: disable playwright test on windows 2023-01-16 13:07:57 +01:00
Vladimir
a186a7e12f
fix: don't use ownKeys, when interoping a module (#2629) 2023-01-10 18:24:50 +01:00
Sneaken
4745eaa275
fix: add missing types in TS project when global is true (#2631) 2023-01-10 13:01:21 +01:00
Vladimir
6b3e36d4e9
fix: allow mocking CJS module with interoped default (#2598)
* fix: allow mocking CJS module with interoped default

* chore: cleanup

* chore: cleanup
2023-01-06 13:11:10 +01:00
Vladimir
c479d9c0d2
fix: don't hang when mocking module with circular dependency (#2572) 2022-12-28 14:52:25 +01:00
Vladimir
a431df80b3
fix: correctly automock nested interoped defaults (#2559)
* fix: correctly automock nested interoped defaults

* chore: cleanup

* chore: cleanup
2022-12-25 09:13:16 +01:00
Anthony Fu
853eeddba8
feat(mock): expose a importOriginal helper to the factory (#2551) 2022-12-22 14:26:05 +01:00
NaeHyeok Jeong
6277884823
chore: update msw (#2542) 2022-12-21 10:12:09 +03:00
Vladimir
084e929c8e
fix!: correctly interop nested default for external and inlined modules (#2512)
* fix: correctly interop nested default for external and inlined modules, if environment is not node

* chore: cleanup

* chore: cleanup

* test: update default interop test

* chore: update module interop tests

* fix: add environment to enzym example

* chore: update tests

* test: don't run module tests without threads, because we don't clear ESM cache

* chore: correctly reset current test environment
2022-12-16 15:33:42 +01:00
Vladimir
58ee8e9b63
feat!: rewrite how vite-node resolves id (#2463)
* feat!: rewrite how vite-node resolves id

* chore: try to fix global setup test

* fix: remove /@fs/ from filepath

* chore: cleanup

* fix: normalize id for callstack

* fix: don't append "/" before disk drive on windows

* chore: cleanup

* chore: add test that windows drive is not repeated

* fix: dirname uses \\, update windows paths tests

* refactor: rename variables

* fix: don't provide importer only for /@id/

* chore: remove null byte placeholder as part of unwrapRef

* chore: cleanup

* chore: variables renaming

* fix: don't hang on circular mock

* test: update c8 snapshot

* chore: add compatibility layer for users who don't provide resolveId

* test: fix url handling in web worker

* test: fix file tests on windows

* chore: remove unnecessary normalizations in mocker

* chore: use /@fs/ when fetching module, if possible
2022-12-16 15:32:34 +01:00
renovate[bot]
d30e38c0ea
chore(deps): update all non-major dependencies (#2487)
* chore(deps): update all non-major dependencies

* chore: cleanup

* chore: cleanup

* chore: don't update source-map

* chore: update license

* chore: fix cause error

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
2022-12-13 10:19:19 +01:00
Vladimir
3bb6b0c880
feat: support Vite 4 (#2470)
* chore: fix types issues

* chore: update deps and docs

* chore: update deps

* chore: reorder deps

* fix: make junit output consistent number
2022-12-10 20:20:46 +01:00
Vladimir
32cc1a66df
chore: improve error, when accessing undefined mocked key (#2388) 2022-12-05 15:30:13 +01:00
Jean-François Greffier
5d7463e5c9
chore: update Playwright example (#2372) 2022-11-25 00:52:08 +08:00
Guo Yunhe
10ec04d1c4
docs: update react-testing-lib example (#2263) 2022-11-07 18:36:45 +08:00
Anthony Fu
0896344c7e
fix!: drop support for Vite 2 (#1928)
* fix: drop support for Vite 2

* chore: lock

* chore: fix lit test

* chore: fix lit test

Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
2022-10-07 13:44:10 +02:00
Vladimir
96d1267bcb
feat: give helpful message, when using vi.mock (#2047) 2022-09-18 11:01:13 +08:00
Vladimir
7ae53dcfcb
fix(mocker): correctly mock libraries with extension in their name (#2035) 2022-09-13 11:13:31 +03:00
Vladimir
b237e64b9a
test: fix cypress tests by deduping vue (#2036)
* test: fix cypress tests by deduping vue

* chore: add vue dependency to mocks

* chore: cleanup
2022-09-13 11:13:21 +03:00
irvile
e5cf1c1915
feat: added fastify example (#1991) 2022-09-08 11:32:52 +03:00
Anthony Fu
b4aad6a789
chore: workaround test-ui ci failure (#1942) 2022-08-31 16:09:22 +08:00
Simon Abbott
9f887f3598
fix: automock getters and setters (#1903)
* fix: automock getters and setters

* refactor: do not mock getters/setters

Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
2022-08-30 18:48:57 +03:00
renovate[bot]
a5d1ef498b
chore(deps): update all non-major dependencies (#1895)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-08-29 05:21:53 +00:00
Lioness100
f13e54f096
chore: fix typos (#1857)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-08-15 18:38:15 +00:00
DateTime
18037e7316
chore(types): add vite-env.d.ts to vue example (#1856) 2022-08-16 02:21:17 +08:00
Anthony Fu
b70593955f
chore: update deps (#1853) 2022-08-15 15:13:37 +08:00