Skip to content

Commit

Permalink
feat: disable devtools in test mode
Browse files Browse the repository at this point in the history
antfu committed Nov 15, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 999b2a1 commit 51e8de6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/devtools/src/module.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,10 @@ export default defineNuxtModule<ModuleOptions>({
},
defaults: defaultOptions,
setup(options, nuxt) {
// Disbale in test mode
if (process.env.VITEST || process.env.TEST)
return

if (typeof options === 'boolean')
options = { enabled: options }

0 comments on commit 51e8de6

Please sign in to comment.