Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('TypeScript HMR', () => {
// Events can be finicky in CI. This switches to a more reliable
// polling method.
CHOKIDAR_USEPOLLING: 'true',
CHOKIDAR_INTERVAL: 500,
CHOKIDAR_INTERVAL: '500',
},
})
})
Expand Down Expand Up @@ -102,18 +102,10 @@ describe('TypeScript HMR', () => {
await new Promise((resolve) => setTimeout(resolve, 500))
}
await fs.writeFile(pagePath, errContent)
const res = await check(
async () => {
const html = await browser.eval(
'document.querySelector("p").innerText'
)
return html.match(/hello with error/) ? 'success' : 'fail'
},
/success/,
false
)

expect(res).toBe(true)
await check(async () => {
const html = await browser.eval('document.querySelector("p").innerText')
return html.match(/hello with error/) ? 'success' : 'fail'
}, /success/)
} finally {
if (browser) browser.close()
await fs.writeFile(pagePath, origContent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const appDir = join(__dirname, '..')
let appPort
let app

async function get$(path, query) {
async function get$(path, query?: any) {
const html = await renderViaHTTP(appPort, path, query)
return cheerio.load(html)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const appDir = join(__dirname, '..')
let appPort
let app

async function get$(path, query) {
async function get$(path, query?: any) {
const html = await renderViaHTTP(appPort, path, query)
return cheerio.load(html)
}
Expand Down
3 changes: 2 additions & 1 deletion test/integration/typescript-workspaces-paths/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true
}
},
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ const expectedErr =
onStderr(msg) {
output += msg || ''
},
ontStdout(msg) {
output += msg || ''
},
})

expect(output).toMatch(expectedErr)
Expand Down
Loading