Skip to content

Commit

Permalink
style: minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 committed Nov 28, 2023
1 parent 38f796e commit 8c495e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/zod.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,13 @@ test.group('Zod validation adaptater', () => {
debug: true,
})

// Test without variable
await fs.create(ENV_FILENAME, '')

// @ts-ignore
const { define } = await plugin.config({ root: fs.basePath }, viteEnvConfig)
assert.equal(define['import.meta.env.VITE_OPTIONAL_ZOD'], '"d"')
const logs = plugin.ui.logger.getLogs()

assert.equal(define['import.meta.env.VITE_OPTIONAL_ZOD'], '"d"')
assert.deepEqual(logs[0].message, 'cyan([vite-plugin-validate-env]) debug process.env content')
assert.deepInclude(logs[1].message, 'cyan(VITE_OPTIONAL_ZOD): d')
})
Expand Down

0 comments on commit 8c495e8

Please sign in to comment.