{"_id":"vitest-auto-mock","_rev":"8-ce7f5a072c7d0bc3de3e0b71c9a405dc","name":"vitest-auto-mock","dist-tags":{"latest":"0.1.3"},"versions":{"0.0.1":{"name":"vitest-auto-mock","version":"0.0.1","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"license":"MIT","_id":"vitest-auto-mock@0.0.1","maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"homepage":"https://github.com/mekiert/vitest-auto-mock","bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"dist":{"shasum":"e8b751ec2601b2df9c74693c8a747831a2ec3e06","tarball":"https://registry.npmjs.org/vitest-auto-mock/-/vitest-auto-mock-0.0.1.tgz","fileCount":9,"integrity":"sha512-jFejwmTCMVRXWuCfdQKUpIsvAiPprTlEtpi7B+SNumantTa8fPLyUG5lgqnMaUJVg0Xew3iMkI97o3BUocbWOg==","signatures":[{"sig":"MEUCIQCRbl0lBHA0bq94RRwhDFt3aMDDwRBuvy+Ykm6U1XpONQIgKkhQhxJnMI2jecLbeQ7lCr0sJAsK85k/+S9ua4YkqFA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9166},"type":"module","engines":{"node":">=16"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js","require":"./build/index.cjs"},"./plugin":{"types":"./build/index.d.ts","import":"./build/plugin/index.js","require":"./build/plugin/index.cjs"}},"gitHead":"0460878f5cf7804c6f75e5e2f5d33143edc10dca","scripts":{"test":"vitest","build":"tsc && vite build","build-lib":"tsc && vite build && npm pack --pack-destination=./build-lib"},"_npmUser":{"name":"mekiert","email":"mekiert.software@proton.me"},"repository":{"url":"git+https://github.com/mekiert/vitest-auto-mock.git","type":"git"},"_npmVersion":"10.8.2","description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"vite":"5.4.1","jsdom":"25.0.0","react":"18.3.1","vitest":"2.0.5","react-dom":"18.3.1","typescript":"5.5.3","@types/react":"18.3.5","vite-plugin-dts":"4.1.0","@testing-library/dom":"10.4.0","@vitejs/plugin-react":"4.3.1","@testing-library/react":"16.0.1"},"lockFileVersion":3,"_npmOperationalInternal":{"tmp":"tmp/vitest-auto-mock_0.0.1_1725299570490_0.8009036142209758","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"vitest-auto-mock","version":"0.0.2","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"license":"MIT","_id":"vitest-auto-mock@0.0.2","maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"homepage":"https://github.com/mekiert/vitest-auto-mock","bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"dist":{"shasum":"b48bcf3b2d7f10d33976a7f4a95063919df79d8e","tarball":"https://registry.npmjs.org/vitest-auto-mock/-/vitest-auto-mock-0.0.2.tgz","fileCount":10,"integrity":"sha512-LhlQ1BAjDRKA6zPunt11g/oJRnHj//RyOmhVgw67Hg2h3sJN1JOAC/4yGMTVkGOrCISFW0hlt1AWCIB5hTueYQ==","signatures":[{"sig":"MEQCIAGA5CkRFUsaH7qGnkBLUB8ED3YCLyvjnlzUAlA4i6AwAiBGWp7IwK/0eVroqVAheUvqjvNCVlSXtHC+fdq2iDjzqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9607},"type":"module","engines":{"node":">=16"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js","require":"./build/index.cjs"},"./plugin":{"types":"./build/index.d.ts","import":"./build/plugin/index.js","require":"./build/plugin/index.cjs"}},"gitHead":"7a4834379bf1bf26f748c337a1f27c3b4c3de480","scripts":{"test":"vitest","build":"tsc && vite build","build-lib":"tsc && vite build && npm pack --pack-destination=./build-lib"},"_npmUser":{"name":"mekiert","email":"mekiert.software@proton.me"},"repository":{"url":"git+https://github.com/mekiert/vitest-auto-mock.git","type":"git"},"_npmVersion":"10.8.2","description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"vite":"5.4.1","jsdom":"25.0.0","react":"18.3.1","vitest":"2.0.5","react-dom":"18.3.1","typescript":"5.5.3","@types/react":"18.3.5","vite-plugin-dts":"4.1.0","@testing-library/dom":"10.4.0","@vitejs/plugin-react":"4.3.1","@testing-library/react":"16.0.1","@testing-library/jest-dom":"6.5.0"},"lockFileVersion":3,"_npmOperationalInternal":{"tmp":"tmp/vitest-auto-mock_0.0.2_1725807953248_0.16454239686052108","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"vitest-auto-mock","version":"0.0.3","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"license":"MIT","_id":"vitest-auto-mock@0.0.3","maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"homepage":"https://github.com/mekiert/vitest-auto-mock","bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"dist":{"shasum":"17d0507ba738f8f229ec2886f8336d64f0ab8418","tarball":"https://registry.npmjs.org/vitest-auto-mock/-/vitest-auto-mock-0.0.3.tgz","fileCount":9,"integrity":"sha512-GUZm7vWwvKXpe+HRCRjJAcju0olr906CU7mcfA9na8HD3aVqo7Z9v7ltFUElN+A+9ZF/0o96QEGpuBzCUxh4Pw==","signatures":[{"sig":"MEUCIQDfCeSyxCiOL/sSN+bZfXd9CZ8XcjVN5WSOaOSVW8LyzwIgREogsdjm8icYreinUdpYcc/XUl4r9sjRBrXiliLQvaY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9607},"type":"module","engines":{"node":">=16"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js","require":"./build/index.cjs"},"./plugin":{"types":"./build/index.d.ts","import":"./build/plugin/index.js","require":"./build/plugin/index.cjs"}},"gitHead":"73d4ba7a57f604fcab3136384bdb5c27e03b6e55","scripts":{"test":"vitest","build":"tsc && vite build","build-lib":"tsc && vite build && npm pack --pack-destination=./build-lib"},"_npmUser":{"name":"mekiert","email":"mekiert.software@proton.me"},"repository":{"url":"git+https://github.com/mekiert/vitest-auto-mock.git","type":"git"},"_npmVersion":"10.8.2","description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"vite":"5.4.1","jsdom":"25.0.0","react":"18.3.1","vitest":"2.0.5","react-dom":"18.3.1","typescript":"5.5.3","@types/react":"18.3.5","vite-plugin-dts":"4.1.0","@testing-library/dom":"10.4.0","@vitejs/plugin-react":"4.3.1","@testing-library/react":"16.0.1","@testing-library/jest-dom":"6.5.0"},"lockFileVersion":3,"_npmOperationalInternal":{"tmp":"tmp/vitest-auto-mock_0.0.3_1725821515423_0.5008004664534424","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"vitest-auto-mock","version":"0.0.4","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"license":"MIT","_id":"vitest-auto-mock@0.0.4","maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"homepage":"https://github.com/mekiert/vitest-auto-mock","bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"dist":{"shasum":"73e3e7d22aed72437cc678ecfcecd6f6b1ff7736","tarball":"https://registry.npmjs.org/vitest-auto-mock/-/vitest-auto-mock-0.0.4.tgz","fileCount":9,"integrity":"sha512-oxltNjBsPBYQjkCBkf+QOOjT+tn9Hd9w3SWS4F3kTVegHtrFzIr/2Wuju/RfCJ3MxJCB45uRrDhb1v2uXWXn1A==","signatures":[{"sig":"MEUCIHIMjvZvNvrBk4nW3FNcQQJd0OPtnxxcfiSHLl48MbkPAiEAnhI8/nSfeBzaf/Y4vnrEmOOpiixajjljRUbbvnA0CSw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10063},"type":"module","engines":{"node":">=16"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js","require":"./build/index.cjs"},"./plugin":{"types":"./build/index.d.ts","import":"./build/plugin/index.js","require":"./build/plugin/index.cjs"}},"gitHead":"4e43f616b0d1ddf46305a04917c3b5a7d733f040","scripts":{"test":"vitest","build":"tsc && vite build","build-lib":"tsc && vite build && npm pack --pack-destination=./build-lib"},"_npmUser":{"name":"mekiert","email":"mekiert.software@proton.me"},"repository":{"url":"git+https://github.com/mekiert/vitest-auto-mock.git","type":"git"},"_npmVersion":"10.8.2","description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"vite":"5.4.1","jsdom":"25.0.0","react":"18.3.1","vitest":"2.0.5","react-dom":"18.3.1","typescript":"5.5.3","@types/react":"18.3.5","vite-plugin-dts":"4.1.0","@testing-library/dom":"10.4.0","@vitejs/plugin-react":"4.3.1","@testing-library/react":"16.0.1","@testing-library/jest-dom":"6.5.0"},"lockFileVersion":3,"peerDependencies":{"vitest":"*"},"_npmOperationalInternal":{"tmp":"tmp/vitest-auto-mock_0.0.4_1726478863823_0.5629880184333742","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"vitest-auto-mock","version":"0.1.0","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"license":"MIT","_id":"vitest-auto-mock@0.1.0","maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"homepage":"https://github.com/mekiert/vitest-auto-mock","bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"dist":{"shasum":"01f9a3d204e37c7183752b3609b6a21785c7e05d","tarball":"https://registry.npmjs.org/vitest-auto-mock/-/vitest-auto-mock-0.1.0.tgz","fileCount":6,"integrity":"sha512-QNrV6/ZtQvKokItWRQpvBHZwHB26LYrejEJquzMOixODAZ/6rch09GDMP0BWW25YQxMgxVqmCZnQBNjQU7jhaA==","signatures":[{"sig":"MEUCIQDfMQOB0c3VK0NcLYbZqUzlL71Vi3J/r2bPe/aGRWRRZgIgazx0+l2FUPr4U82tgxqJTmROA3zDNA/Y6N5Gf1cv7b4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8010},"type":"module","engines":{"node":">=16"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js","require":"./build/index.cjs"}},"gitHead":"099fc6fdfd7961732d051729cef2ef9377ec0d11","scripts":{"test":"vitest","build":"tsc && vite build","build-lib":"tsc && vite build && npm pack --pack-destination=./build-lib"},"_npmUser":{"name":"mekiert","email":"mekiert.software@proton.me"},"repository":{"url":"git+https://github.com/mekiert/vitest-auto-mock.git","type":"git"},"_npmVersion":"10.8.2","description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"vite":"5.4.1","jsdom":"25.0.0","react":"18.3.1","vitest":"2.0.5","react-dom":"18.3.1","typescript":"5.5.3","@types/react":"18.3.5","vite-plugin-dts":"4.1.0","@testing-library/dom":"10.4.0","@vitejs/plugin-react":"4.3.1","@testing-library/react":"16.0.1","@testing-library/jest-dom":"6.5.0"},"lockFileVersion":3,"peerDependencies":{"vitest":"*"},"_npmOperationalInternal":{"tmp":"tmp/vitest-auto-mock_0.1.0_1727638013428_0.7054615932880486","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"vitest-auto-mock","version":"0.1.1","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"license":"MIT","_id":"vitest-auto-mock@0.1.1","maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"homepage":"https://github.com/mekiert/vitest-auto-mock","bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"dist":{"shasum":"d21f65b039c5a7b7c02a0bf7cf06fba3ef1fad6e","tarball":"https://registry.npmjs.org/vitest-auto-mock/-/vitest-auto-mock-0.1.1.tgz","fileCount":6,"integrity":"sha512-TFivICm1O7ZUCTJ10tG4TEwy3idOA3r7p6ILzFjZ/kGAqdDmLb7SowDJBzsNSGeGS0R5HJULjZEdve6RJHT/ew==","signatures":[{"sig":"MEQCIAbBXtZYX8BGAGWvfyVqkQxFwvq265jVD2Okrwe6HsM2AiAeYFMY6QjEemSrvX3doWgBfCi9f39KeCE64qid8q3/Uw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8336},"type":"module","engines":{"node":">=16"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js","require":"./build/index.cjs"}},"gitHead":"c5f7d3ccf756b83ae361af1168fa2da2bd6f8ad7","scripts":{"test":"vitest","build":"tsc && vite build","build-lib":"tsc && vite build && npm pack --pack-destination=./build-lib"},"_npmUser":{"name":"mekiert","email":"mekiert.software@proton.me"},"repository":{"url":"git+https://github.com/mekiert/vitest-auto-mock.git","type":"git"},"_npmVersion":"10.8.2","description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"vite":"5.4.1","jsdom":"25.0.0","react":"18.3.1","vitest":"2.0.5","react-dom":"18.3.1","typescript":"5.5.3","@types/react":"18.3.5","vite-plugin-dts":"4.1.0","@testing-library/dom":"10.4.0","@vitejs/plugin-react":"4.3.1","@testing-library/react":"16.0.1","@testing-library/jest-dom":"6.5.0"},"lockFileVersion":3,"peerDependencies":{"vitest":"*"},"_npmOperationalInternal":{"tmp":"tmp/vitest-auto-mock_0.1.1_1727817614062_0.6412030330999763","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"vitest-auto-mock","version":"0.1.2","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"license":"MIT","_id":"vitest-auto-mock@0.1.2","maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"homepage":"https://github.com/mekiert/vitest-auto-mock","bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"dist":{"shasum":"c99a255553e39711bf1de1b59ac21bd1a5844276","tarball":"https://registry.npmjs.org/vitest-auto-mock/-/vitest-auto-mock-0.1.2.tgz","fileCount":6,"integrity":"sha512-dqgAiEtTiV1TmvY7W/PYDPLZ/6vXgw+pRiQCPRtTp894nnCsrADJtYW961MuXvggZVZ/FFeU2pLUV3TDNR1STQ==","signatures":[{"sig":"MEYCIQDV8PdoBXuv8rT3WpbZCiHWyJ/5cfr/MBHqosNqBaRL+gIhAK+yC5TIkfgXvcXrwPAISKgnTZs4Qz51AS6IpzBhYtXd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8336},"type":"module","engines":{"node":">=16"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js","require":"./build/index.cjs"}},"gitHead":"894293c874b0bca15832e4566de0b6598959ffd3","scripts":{"test":"vitest","build":"tsc && vite build","build-lib":"tsc && vite build && npm pack --pack-destination=./build-lib"},"_npmUser":{"name":"mekiert","email":"mekiert.software@proton.me"},"repository":{"url":"git+https://github.com/mekiert/vitest-auto-mock.git","type":"git"},"_npmVersion":"10.8.2","description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"vite":"5.4.1","jsdom":"25.0.0","react":"18.3.1","vitest":"2.0.5","react-dom":"18.3.1","typescript":"5.5.3","@types/react":"18.3.5","vite-plugin-dts":"4.1.0","@testing-library/dom":"10.4.0","@vitejs/plugin-react":"4.3.1","@testing-library/react":"16.0.1","@testing-library/jest-dom":"6.5.0"},"lockFileVersion":3,"peerDependencies":{"vitest":"*"},"_npmOperationalInternal":{"tmp":"tmp/vitest-auto-mock_0.1.2_1732821315094_0.3208052135945778","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"vitest-auto-mock","version":"0.1.3","description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"homepage":"https://github.com/mekiert/vitest-auto-mock","repository":{"type":"git","url":"git+https://github.com/mekiert/vitest-auto-mock.git"},"license":"MIT","type":"module","lockFileVersion":3,"engines":{"node":">=22"},"scripts":{"test":"tsc && vitest","build":"tsc && vite build","build-lib":"tsc && vite build && npm pack --pack-destination=./build-lib"},"devDependencies":{"@testing-library/dom":"10.4.1","@testing-library/jest-dom":"6.9.1","@testing-library/react":"16.3.2","@types/react":"19.2.11","@vitejs/plugin-react":"5.1.3","jsdom":"28.0.0","react":"19.2.4","react-dom":"19.2.4","typescript":"5.9.3","vite":"7.3.1","vite-plugin-dts":"4.5.4","vitest":"4.0.18"},"peerDependencies":{"vitest":"*"},"exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js","require":"./build/index.cjs"}},"_id":"vitest-auto-mock@0.1.3","gitHead":"3fde2333ffd8f1d69daa29b7e805e8a532ff3b36","bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-36RtFgXC0h4egYhOccCV8pv0AABeVjbjpOYMys5xMFAUi8o25U+mMHj6EMu+PdfxQyJ7ipjsiSnl0OQBCDfuWA==","shasum":"51d6857790312aa15366f56b466b577ca7a1dfce","tarball":"https://registry.npmjs.org/vitest-auto-mock/-/vitest-auto-mock-0.1.3.tgz","fileCount":6,"unpackedSize":8344,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID6EODpodeceJDjEiyYeGCMZtrCPNPEWfz9PlBOb5HWYAiEAsDzN7rBck9oph+T98pBpVvYMRMPnee3G6AadTC3t0ZE="}]},"_npmUser":{"name":"mekiert","email":"mekiert.software@proton.me"},"directories":{},"maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vitest-auto-mock_0.1.3_1770253782737_0.7835387894150196"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-02T17:52:50.489Z","modified":"2026-02-05T01:09:43.071Z","0.0.1":"2024-09-02T17:52:50.644Z","0.0.2":"2024-09-08T15:05:53.397Z","0.0.3":"2024-09-08T18:51:55.622Z","0.0.4":"2024-09-16T09:27:43.963Z","0.1.0":"2024-09-29T19:26:53.626Z","0.1.1":"2024-10-01T21:20:14.226Z","0.1.2":"2024-11-28T19:15:15.291Z","0.1.3":"2026-02-05T01:09:42.953Z"},"bugs":{"url":"https://github.com/mekiert/vitest-auto-mock/issues"},"author":{"name":"Mateusz Ekiert","email":"mekiert.software@proton.me"},"license":"MIT","homepage":"https://github.com/mekiert/vitest-auto-mock","keywords":["Vitest","testing","mocking","mock","mocks","automock","TypeScript","ts"],"repository":{"type":"git","url":"git+https://github.com/mekiert/vitest-auto-mock.git"},"description":"Library for mocking dependencies in Vitest with TypeScript without need to provide a path.","maintainers":[{"name":"mekiert","email":"mekiert.software@proton.me"}],"readme":"# vitest-auto-mock\r\n[![tests](https://github.com/mekiert/vitest-auto-mock/actions/workflows/tests.yml/badge.svg)](https://github.com/mekiert/vitest-auto-mock/actions/workflows/tests.yml)\r\n[![NPM Type Definitions](https://img.shields.io/npm/types/vitest-auto-mock)](https://github.com/mekiert/vitest-auto-mock)\r\n[![NPM Version](https://img.shields.io/npm/v/vitest-auto-mock)](https://www.npmjs.com/package/vitest-auto-mock)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://raw.githubusercontent.com/mekiert/vitest-auto-mock/master/LICENCE)\r\n\r\nA convenient way to define mocks in your Vitest tests without a need to provide the mocked entity path. The path to mock is automatically obtained from the import of the module.\r\n\r\nBEFORE\r\n```ts\r\nvi.mock('src/components/auth/AuthComponent');\r\nconst AuthComponentMock = vi.mocked(AuthComponent);\r\n```\r\n\r\nAFTER\r\n```ts\r\nconst AuthComponentMock = vi.mocked(AuthComponent);\r\n```\r\n\r\n## Installation\r\n\r\n```sh\r\nnpm install -D vitest-auto-mock\r\n```\r\n\r\n## Requirements\r\nAs this library is an extension for `vitest`, it is required to have `vitest` already installed.\r\n\r\n\r\n## Configuration\r\nTo use automatically provided mocks, the Vite plugin must be used.\r\n\r\n```ts\r\n// vite.config.ts\r\nimport { defineConfig } from 'vite';\r\nimport vitestAutoMockPlugin from 'vitest-auto-mock';\r\n\r\nexport default defineConfig({\r\n  plugins: [vitestAutoMockPlugin()],\r\n  {...}\r\n}));\r\n```\r\n\r\nThe whole feature is automatically activated after enabling the plugin.\r\n\r\nIf there is a separated configuration for `vitest` (like `vitest.config.ts`), it will be a better place to use the plugin.\r\n\r\n\r\n## Usage\r\n```ts\r\nimport { App } from 'src/app';\r\nimport { render } from '@testing-library/react';\r\nimport { RouterProvider } from 'react-router-dom';\r\n\r\n// No need to use vi.mock('react-router-dom')\r\nconst RouterProviderMock = vi.mocked(RouterProvider);\r\n\r\nit('should call RouterProvider', () => {\r\n  RouterProviderMock.mockImplementation(() => <div>Router mock</div>);\r\n\r\n  render(<App/>);\r\n  expect(RouterProviderMock).toBeCalledTimes(1);\r\n});\r\n```\r\n\r\n### ✅ Working with @testing-library/react\r\nThe primary goal of the library was to make React elements mocking easier. It is checked that `vitest-auto-mock` is working with `@testing-library/react`.\r\n\r\n\r\n### ✅ Working with JavaScript\r\nThe library is providing support for types of `vitest` mocks. However, it is possible to use it within JavaScript tests.\r\n\r\n\r\n## Limitations\r\nThis project is not a magic. It is based on the simple assumption that variable used as an argument of `vi.mocked` is imported somewhere in the test file. The path is obtained from the [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of the test file, and `vi.mock` function with the obtained path is added to the code. Therefore, any non-imported or re-assigned parameter probably will not work.\r\n\r\n\r\n## Authors\r\n- [Mateusz Ekiert](https://github.com/mekiert)\r\n","readmeFilename":"README.md"}