Skip to content

Commit

Permalink
feat: disable devtools in test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 15, 2023
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
Expand Up @@ -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 }

Expand Down

0 comments on commit 51e8de6

Please sign in to comment.