use `process.env.VITEST`

This commit is contained in:
Felicio Mununga 2022-08-23 20:37:50 +02:00
parent 45cd81eaab
commit add9e31d8d
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ const external = [
export default defineConfig(({ mode }) => {
const alias: Alias[] = []
if (mode === 'test') {
if (process.env.VITEST === 'true' || mode === 'test') {
alias.push({
/**
* Note: `happy-dom` nor `jsdom` have Crypto implemented (@see https://github.com/jsdom/jsdom/issues/1612)