Unverified Commit 0cebaa1a authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[test] Move all files to .ts (6/6) (#85641)

parent 089ca2c0
......@@ -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',
},
})
})
......@@ -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)
......
......@@ -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)
}
......
......@@ -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)
}
......
......@@ -27,5 +27,6 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true
}
},
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
}
......@@ -31,9 +31,6 @@ const expectedErr =
onStderr(msg) {
output += msg || ''
},
ontStdout(msg) {
output += msg || ''
},
})
expect(output).toMatch(expectedErr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment