mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
25 lines
709 B
TypeScript
25 lines
709 B
TypeScript
import { afterEach, expect, test } from 'vitest'
|
|
import { runBrowserTests } from './utils'
|
|
|
|
afterEach(() => {
|
|
delete process.env.TEST_HTTPS
|
|
})
|
|
|
|
test('server-url http', async () => {
|
|
const { stdout, stderr } = await runBrowserTests({
|
|
root: './fixtures/server-url',
|
|
})
|
|
expect(stderr).toBe('')
|
|
expect(stdout).toContain('Browser runner started at http://localhost:5173/')
|
|
})
|
|
|
|
test('server-url https', async () => {
|
|
process.env.TEST_HTTPS = '1'
|
|
const { stdout, stderr } = await runBrowserTests({
|
|
root: './fixtures/server-url',
|
|
})
|
|
expect(stderr).toBe('')
|
|
expect(stdout).toContain('Browser runner started at https://localhost:5173/')
|
|
expect(stdout).toContain('Test Files 1 passed')
|
|
})
|