-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test to fail on unset config.base
`pnpm test:workaround`, which deletes config.base, will now timeout. This is in response to: - vitest-dev/vitest#4686 (comment)
- Loading branch information
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
import { test } from 'vitest' | ||
import { expect, test } from 'vitest' | ||
|
||
test('OK in <=1.0.0-beta.4+vite <=5.0.0-beta.7, breaks otherwise', () => null) | ||
test('OK in <=1.0.0-beta.4+vite <=5.0.0-beta.7, breaks otherwise', async () => { | ||
// This will timeout when config.base is undefined. | ||
var page = window.open('/foobar/hello.html') | ||
await new Promise(resolve => page.addEventListener('load', resolve)) | ||
|
||
let e = page.document.querySelector('body p') | ||
|
||
expect(e.textContent).toContain('Hello, World!') | ||
}) |
File renamed without changes.