From: Eduardo San Martin Morote Date: Mon, 25 Apr 2022 13:02:22 +0000 (+0200) Subject: fix(devtools): remove in tests environment X-Git-Tag: @pinia/nuxt@0.1.9~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4aeb0a539f7389a628e6c32bb6849ce3cd50cc17;p=thirdparty%2Fvuejs%2Fpinia.git fix(devtools): remove in tests environment --- diff --git a/packages/pinia/src/createPinia.ts b/packages/pinia/src/createPinia.ts index a5970994..f105460e 100644 --- a/packages/pinia/src/createPinia.ts +++ b/packages/pinia/src/createPinia.ts @@ -57,7 +57,8 @@ export function createPinia(): Pinia { // pinia devtools rely on dev only features so they cannot be forced unless // the dev build of Vue is used - if (__DEV__ && IS_CLIENT) { + // We also don't need devtools in test mode + if (__DEV__ && IS_CLIENT && !__TEST__) { pinia.use(devtoolsPlugin) }