Skip to content

Commit

Permalink
Ignore the errors when assigning to global this
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyd committed Jun 10, 2024
1 parent a20df25 commit d9a8f45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/cli/src/test-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export function useTestPage(
);
await page.evaluate(source);
await page.evaluate(() => {
//@ts-ignore-error this is ok. it only happens in dev mode

Check failure on line 44 in packages/cli/src/test-page.ts

View workflow job for this annotation

GitHub Actions / Tests

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
Object.assign(globalThis, {...globalThis["interactorAgent"]["interactors"]});
//@ts-ignore-error this is ok. it only happens in dev mode

Check failure on line 46 in packages/cli/src/test-page.ts

View workflow job for this annotation

GitHub Actions / Tests

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
Object.assign(globalThis, globalThis["interactorAgent"]["matchers"]);
});
digest = nextdigest;
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2791,7 +2791,7 @@ __metadata:
typescript: "npm:~5.4.5"
yargs: "npm:^17.7.2"
bin:
interactors: ./dist/index.js
interactors: ./dist/main.js
languageName: unknown
linkType: soft

Expand Down

0 comments on commit d9a8f45

Please sign in to comment.