mirror of
https://github.com/hanzoai/vite.git
synced 2026-10-30 19:36:16 +00:00
16 lines
418 B
TypeScript
16 lines
418 B
TypeScript
import { isBuild } from 'testUtils'
|
|
|
|
const mode = isBuild ? `production` : `development`
|
|
|
|
test('mode', async () => {
|
|
expect(await page.textContent('.mode')).toBe(mode)
|
|
})
|
|
|
|
test('mode file override', async () => {
|
|
expect(await page.textContent('.mode-file')).toBe(`.env.${mode}`)
|
|
})
|
|
|
|
test('should not load parent .env file', async () => {
|
|
expect(await page.textContent('.parent-env')).not.toBe('dont_load_me')
|
|
})
|