Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make test case less flaky #57138

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/integration/typescript-hmr/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ describe('TypeScript HMR', () => {
const originalContent = await fs.readFile(pagePath, 'utf8')
const editedContent = originalContent.replace('Hello', 'COOL page')

if (process.env.TURBOPACK) {
// TODO Turbopack needs a bit to start watching
await new Promise((resolve) => setTimeout(resolve, 500))
}

// change the content
await fs.writeFile(pagePath, editedContent, 'utf8')
await check(() => getBrowserBodyText(browser), /COOL page/)
Expand Down Expand Up @@ -93,6 +98,10 @@ describe('TypeScript HMR', () => {
'() => <p>Hello world</p>',
'(): boolean => <p>hello with error</p>'
)
if (process.env.TURBOPACK) {
// TODO Turbopack needs a bit to start watching
await new Promise((resolve) => setTimeout(resolve, 500))
}
await fs.writeFile(pagePath, errContent)
const res = await check(
async () => {
Expand Down
Loading