Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tsconfig for test/ directory #68346

Merged
merged 8 commits into from
Dec 27, 2024
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
153 changes: 78 additions & 75 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"@types/estree": "1.0.5",
"@types/istanbul-lib-report": "3.0.0",
"@types/mime": "2.0.3",
"@types/node": "20.17.10",
"@types/npm-package-arg": "6.1.1",
"@types/prettier": "2.4.4",
"@types/qs": "6.9.7",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { defineConfig, devices } from '@playwright/test';
/**
* WordPress dependencies
*/
const baseConfig = require( '@wordpress/scripts/config/playwright.config' );
import baseConfig from '@wordpress/scripts/config/playwright.config.js';

const config = defineConfig( {
...baseConfig,
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/interactivity/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const test = base.extend< Fixtures >( {
async ( { requestUtils }, use ) => {
await use( new InteractivityUtils( { requestUtils } ) );
},
// @ts-ignore: The required type is 'test', but can be 'worker' too. See
// This is a hack, 'worker' is a valid value but the type is wrong.
// https://playwright.dev/docs/test-fixtures#worker-scoped-fixtures
{ scope: 'worker' },
{ scope: 'worker' as 'test' },
],
} );
8 changes: 4 additions & 4 deletions test/e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"checkJs": false,
"noEmit": true,
"emitDeclarationOnly": false,
"allowJs": true,
"checkJs": false
"rootDir": ".",
"types": [ "node" ]
},
"include": [ "**/*" ],
"include": [ "." ],
"exclude": []
}
2 changes: 1 addition & 1 deletion test/performance/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { defineConfig } from '@playwright/test';
/**
* WordPress dependencies
*/
const baseConfig = require( '@wordpress/scripts/config/playwright.config' );
import baseConfig from '@wordpress/scripts/config/playwright.config.js';

process.env.ASSETS_PATH = path.join( __dirname, 'assets' );

Expand Down
8 changes: 4 additions & 4 deletions test/performance/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"checkJs": false,
"noEmit": true,
"emitDeclarationOnly": false,
"allowJs": true,
"checkJs": false
"rootDir": ".",
"types": [ "node" ]
},
"include": [ "**/*" ],
"include": [ "." ],
"exclude": []
}
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
{ "path": "packages/url" },
{ "path": "packages/vips" },
{ "path": "packages/warning" },
{ "path": "packages/wordcount" }
{ "path": "packages/wordcount" },
{ "path": "test/e2e" },
{ "path": "test/performance" }
Comment on lines +63 to +64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should certainly be here 👍

],
"files": []
}
Loading