Skip to content

Commit 69ecadf

Browse files
committed
fix: add playwright tsconfig
1 parent 9c4625e commit 69ecadf

5 files changed

Lines changed: 714 additions & 777 deletions

File tree

.playwright/tests/codeblockInlineStyles.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const INLINE_MARK_TAG = /<\s*(b|i|u|s|code)\b/i;
1313

1414
function htmlInsideCodeblock(serialized: string): string {
1515
const m = serialized.match(/<codeblock[^>]*>([\s\S]*?)<\/codeblock>/i);
16-
return m ? m[1] : '';
16+
return m && m[1] ? m[1] : '';
1717
}
1818

1919
test.describe('codeblock inline styles', () => {

.playwright/tests/headingBoldFromStyle.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { toolbarButton } from '../helpers/toolbar';
1111

1212
function h1Inner(serialized: string): string | null {
1313
const m = serialized.match(/<h1[^>]*>([\s\S]*?)<\/h1>/);
14-
return m ? m[1] : null;
14+
return m && m[1] ? m[1] : null;
1515
}
1616

1717
const HTML_STYLE_H1_BOLD_TRUE = '{ "h1": { "bold": true } }';

.playwright/tsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "../tsconfig.base.json",
3+
"compilerOptions": {
4+
"types": ["node"],
5+
},
6+
"include": ["**/*.ts"],
7+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@
4747
"docs-install": "cd docs && yarn install",
4848
"docs-start": "cd docs && yarn start",
4949
"test": "jest --passWithNoTests",
50-
"typecheck": "yarn typecheck:lib && yarn typecheck:example && yarn typecheck:example-web",
50+
"typecheck": "yarn typecheck:lib && yarn typecheck:example && yarn typecheck:example-web && yarn typecheck:playwright",
5151
"typecheck:lib": "tsc -p tsconfig.build.json",
5252
"typecheck:example": "tsc -p apps/example/tsconfig.json",
5353
"typecheck:example-web": "tsc -p apps/example-web/tsconfig.app.json",
5454
"typecheck:docs": "cd docs && yarn typecheck",
55+
"typecheck:playwright": "tsc -p .playwright/tsconfig.json",
5556
"lint": "eslint \"**/*.{js,ts,tsx}\"",
5657
"lint:android": "cd apps/example/android && ./gradlew lintVerify",
5758
"lint:android:fix": "cd apps/example/android && ./gradlew lintFormat",
@@ -124,6 +125,7 @@
124125
"@react-native/jest-preset": "^0.87.0",
125126
"@release-it/conventional-changelog": "^9.0.2",
126127
"@types/jest": "^29.5.5",
128+
"@types/node": "^22.20.2",
127129
"@types/react": "^19.2.0",
128130
"@types/react-dom": "^19.2.0",
129131
"clang-format": "^1.8.0",

0 commit comments

Comments
 (0)