Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add support for JSX in stuff we import in Cypress test code #8738

Merged
merged 6 commits into from
Jun 30, 2022
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
3 changes: 3 additions & 0 deletions cypress/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import "../src/@types/global";
import "../src/@types/svg";
import "../src/@types/raw-loader";
import "matrix-js-sdk/src/@types/global";
import type {
MatrixClient,
Expand Down
16 changes: 13 additions & 3 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"compilerOptions": {
"target": "es2016",
"lib": ["es2020", "dom"],
"jsx": "react",
"lib": [
"es2020",
"dom",
"dom.iterable"
],
"types": ["cypress", "@percy/cypress"],
"moduleResolution": "node"
"resolveJsonModule": true,
"esModuleInterop": true,
MadLittleMods marked this conversation as resolved.
Show resolved Hide resolved
SimonBrandner marked this conversation as resolved.
Show resolved Hide resolved
"moduleResolution": "node",
"module": "commonjs"
},
"include": ["**/*.ts"]
"include": [
"**/*.ts"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
"lint:js": "eslint --max-warnings 0 src test cypress",
"lint:js-fix": "eslint --fix src test cypress",
"lint:types": "tsc --noEmit --jsx react && tsc --noEmit -p cypress",
"lint:types": "tsc --noEmit --jsx react && tsc --noEmit --jsx react -p cypress",
"lint:style": "stylelint \"res/css/**/*.scss\"",
"test": "jest",
"test:cypress": "cypress run",
Expand Down