Anyone have suggestions on how to e2e test Vite Plugins? #19488
Replies: 1 comment
-
I'm not sure what you consider as "end" in your "e2e", so it totally depends. But relatively light-weight but still realistic way to test plugin pipeline is to use Vite's programatic API, such as Probably you can get some idea from Vite's own tests, for example: vite/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts Lines 255 to 294 in 07091a1 vite/packages/vite/src/node/__tests__/build.spec.ts Lines 784 to 807 in 07091a1 If this is not "e2e" enough for you, then you can always spawn the entire |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to test all the configurations of a plugin, but it depends on other plugins running, so I've found even trying to run all the plugins in Vitest and then manually calling the internal generation functions don't work, I'm kinda stuck, but I assume someone has to have solved this for their plugins.
Beta Was this translation helpful? Give feedback.
All reactions