15 Commits

Author SHA1 Message Date
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
Lioness100
f13e54f096
chore: fix typos (#1857)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-08-15 18:38:15 +00:00
jereklas
8eddd5a380
fix: handle undefined returns of module mocks, and update migration docs (#1763) (#1830)
* handle undefined returns of module mocks, and update migration docs

* correct docs
2022-08-11 09:18:43 +03:00
jereklas
7574759127
fix: add error message when mock is missing export (#1819) 2022-08-08 18:10:59 +03:00
Anthony Fu
49c67d2573
fix(vite-node): self circular reference (#1609) 2022-07-07 16:39:20 +08:00
Vladimir
235b9502f9
fix: can mock files with space in path (#1457)
* fix: can mock files with space in path

* test: testing files with spaces
2022-06-10 10:10:55 +03:00
Vladimir
c491fb448a
fix: can mock non-existent paths and virtual modules via __mocks__ (#1298) 2022-05-13 13:47:30 +00:00
Vladimir
7459ff8a46
fix: clear mock from callstack, if mocked with factory (#1276)
* fix: clear mock from callstack, if mocked with factory

* test: fix test for zustand
2022-05-09 11:38:11 +03:00
Vladimir
110788a793
fix: resolve id before loading from vite (#1204)
* fix: resolve id before loading from vite

* fix: allow import actual modules inside a factory of __mocks__ file

* test: fix custom reporters test

* fix: invalidate mocks

* chore: fix compatability with node 14

* chore: fix callstack position

* chore: remove collect from worker.ts since entry doesn't export that function

* chore: fix pnpm-lock

* chore: slice "mock" from stacktrace

* chore: fix checking callstack for a function mock

* chore: add description to factory mock

* test: add test for importing itself inside __mocks__ folder
2022-05-08 04:41:05 +08:00
Anthony Fu
713c870a55 chore: lint 2022-04-25 19:44:30 +08:00
eleith
06faf8ad49
fix: make automocking aware of symbol indexed methods (#1119)
Co-authored-by: eleith <online-github@eleith.com>
2022-04-08 02:10:19 +08:00
Vladimir
885b25d4f2
fix: automocking prototype fix (#1083) 2022-04-03 15:55:02 +08:00
Janosh Riebesell
4858541f36
docs: add svelte-multiselect to projects using Vitest (#867)
* add svelte-multiselect to projects using Vitest

* fix typos

* Update docs/api/index.md

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-02-28 18:21:14 +08:00
Vladimir
4dbefb59cd
feat: vi.mock can be called inside external libraries (#560)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-01-19 04:39:41 +08:00
Anthony Fu
1670deacf9 chore: move examples 2022-01-04 01:33:51 +08:00