File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
test/fixtures/typescript-typecheck Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,11 @@ test('shows error overlay in browser', async () => {
11
11
const page = await browser . newPage ( ) ;
12
12
await page . goto ( `http://localhost:${ port } /` ) ;
13
13
await page . waitForSelector ( 'iframe' , { timeout : 5000 } ) ;
14
- const errorMsg = await page . evaluate ( ( ) => {
14
+ const overlayMsg = await page . evaluate ( ( ) => {
15
15
const overlay = document . querySelector ( 'iframe' ) . contentWindow ;
16
- const error = overlay . document . querySelector ( 'code' ) ;
17
- return error . innerHTML ;
16
+ return overlay . document . body . innerHTML ;
18
17
} ) ;
19
- expect ( errorMsg ) . toContain ( expectedErrorMsg ) ;
18
+ expect ( overlayMsg ) . toContain ( expectedErrorMsg ) ;
20
19
} finally {
21
20
browser . close ( ) ;
22
21
done ( ) ;
You can’t perform that action at this time.
0 commit comments