mirror of
https://github.com/hanzoai/vite.git
synced 2026-10-30 19:36:16 +00:00
17 lines
459 B
TypeScript
17 lines
459 B
TypeScript
import { expect, test } from 'vitest'
|
|
import { isBuild, page } from '~utils'
|
|
|
|
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')
|
|
})
|