-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
refactor: migrate react tests to typescript #16318
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
Changes from 1 commit
89afdd8
71138af
be3f770
b9f6b2e
fd2d899
06bd989
62162fe
658be10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "composite": true, | ||
| "allowJs": true | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| { | ||
| "extends": "../../../../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "composite": true, | ||
| "allowJs": true, | ||
| "emitDeclarationOnly": false, | ||
| "noEmit": true | ||
| "emitDeclarationOnly": false | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,15 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "include": ["src", "dev-only.d.ts"], | ||
| "include": ["src", "dev-only.d.ts", "package.json"], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're importing Since we only use update: done in be3f770 |
||
| "exclude": ["dist"], | ||
| "compilerOptions": { | ||
| "composite": true, | ||
| "rootDir": "./src", | ||
| "allowJs": true, | ||
| "declarationDir": "./dist", | ||
| "outDir": "./dist", | ||
| "jsx": "preserve", | ||
| "tsBuildInfoFile": "${configDir}/dist/._cache/tsconfig/tsbuildinfo.json", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Notice that https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files I put the |
||
| "erasableSyntaxOnly": true | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,29 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "include": ["test/units/**/*.ts"], | ||
| "include": [ | ||
| "test/units/**/*.ts", | ||
| "test/test-adapter.js", | ||
| "test/test-image-service.js", | ||
| "test/test-plugins.js", | ||
| "test/test-prerenderer.js", | ||
| "test/test-remote-image-service.js", | ||
| "test/test-utils.js" | ||
| ], | ||
| "exclude": ["test/units/_temp-fixtures/**", "test/fixtures/**"], | ||
| "compilerOptions": { | ||
| "noEmit": true, | ||
| "types": ["vite/client", "node"], | ||
| "composite": true, | ||
| "allowJs": true, | ||
| "noUnusedLocals": false, | ||
| "noUnusedParameters": false, | ||
| "rewriteRelativeImportExtensions": true | ||
| } | ||
| }, | ||
| "references": [ | ||
| { | ||
| "path": "./tsconfig.json" | ||
| }, | ||
| { | ||
| "path": "../../scripts/tsconfig.json" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "extends": "../../../tsconfig.base.json", | ||
| "include": ["test/**/*.ts"], | ||
| "exclude": ["test/fixtures/**"], | ||
| "compilerOptions": { | ||
| "noEmit": true, | ||
| "allowJs": true, | ||
| "noUnusedLocals": false, | ||
| "noUnusedParameters": false, | ||
| "rewriteRelativeImportExtensions": true | ||
| }, | ||
| "references": [ | ||
| { | ||
| "path": "../../astro/tsconfig.test.json" | ||
| } | ||
| ] | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "extends": "../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "composite": true, | ||
| "allowJs": true | ||
| }, | ||
| "references": [ | ||
| { | ||
| "path": "../.github/scripts/tsconfig.json" | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, we were using
srcbecause zod could cause some issues. If that's not the case anymore, I'm glad!