Skip to content

Commit

Permalink
test: remove deprecated @types/puppeteer
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroki0525 committed Mar 11, 2024
1 parent 11f8191 commit 5a8f826
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"webpack-dev-server": "^5.0.2"
},
"dependencies": {
"react-dom-lazyload-component": "file:../examples/react-dom-lazyload-component-4.1.5.tgz",
"react-router-dom": "^6.22.3"
}
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"@types/jest": "29.5.12",
"@types/jest-environment-puppeteer": "5.0.6",
"@types/node": "20.11.25",
"@types/puppeteer": "7.0.4",
"@types/react": "18.2.64",
"@types/react-dom": "18.2.21",
"@typescript-eslint/eslint-plugin": "7.1.1",
Expand Down
5 changes: 2 additions & 3 deletions src/__tests__/browser.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'expect-puppeteer';

const waitForTimeout = (milliseconds: number): Promise<void> =>
new Promise(r => setTimeout(r, milliseconds));

Expand Down Expand Up @@ -189,7 +187,8 @@ describe('Browser', () => {
beforeAll(async () => {
await page.setRequestInterception(true);
page.on('request', interceptedRequest => {
if (interceptedRequest.isInterceptResolutionHandled()) return;
if ((interceptedRequest as any).isInterceptResolutionHandled())
return;
const requestUrl = interceptedRequest.url();
if (requestUrl.indexOf(suspenseExampleComponentName) > -1) {
codeSplittedRequestUrl = requestUrl;
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"include": ["src/**/*"],
"exclude": [
"node_modules",
"src/**/*.test.tsx"
"node_modules"
]
}

0 comments on commit 5a8f826

Please sign in to comment.