Skip to content

Commit b41ccd4

Browse files
raju249AutomatedTester
authored andcommitted
Add bazel test rule to fix the rule
1 parent a3963cf commit b41ccd4

File tree

6 files changed

+51
-33
lines changed

6 files changed

+51
-33
lines changed

javascript/grid-ui/.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SKIP_PREFLIGHT_CHECK=true

javascript/grid-ui/BUILD.bazel

+16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
load("@bazel_skylib//rules:write_file.bzl", "write_file")
22
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
33
load("@npm//react-scripts:index.bzl", "react_scripts")
4+
load("@npm//jest-cli:index.bzl", "jest_test")
45
load("//common:defs.bzl", "zip_file")
56

67
_RUNTIME_DEPS = [
@@ -78,3 +79,18 @@ zip_file(
7879
"//java/server/src/org/openqa/selenium/grid:__pkg__",
7980
],
8081
)
82+
83+
jest_test(
84+
name = "test",
85+
args = [
86+
"--no-cache",
87+
"--no-watchman",
88+
"--ci",
89+
"--colors",
90+
"--config",
91+
"jest.config.js"
92+
],
93+
data = [
94+
"//:jest.config.js"
95+
]
96+
)

javascript/grid-ui/package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

javascript/grid-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"start": "node node_modules/react-scripts/bin/react-scripts start",
4444
"build": "node node_modules/react-scripts/bin/react-scripts build && python scripts/rmSourcemaps.py",
4545
"analyze": "source-map-explorer 'build/static/js/*.js'",
46-
"test": "jest",
46+
"test": "node node_modules/react-scripts/bin/react-scripts test --watchAll=false",
4747
"eject": "node node_modules/react-scripts/bin/react-scripts eject"
4848
},
4949
"eslintConfig": {

javascript/grid-ui/src/App.test.tsx

-9
This file was deleted.

javascript/grid-ui/tsconfig.json

+27-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
{
2-
"compilerOptions": {
3-
"target": "es6",
4-
"lib": ["dom", "dom.iterable", "esnext"],
5-
"allowJs": true,
6-
"skipLibCheck": true,
7-
"esModuleInterop": true,
8-
"allowSyntheticDefaultImports": true,
9-
"strict": true,
10-
"forceConsistentCasingInFileNames": true,
11-
"module": "commonjs",
12-
"moduleResolution": "node",
13-
"resolveJsonModule": true,
14-
"isolatedModules": true,
15-
"noEmit": true,
16-
"jsx": "react",
17-
"types": ["@types/jest", "@types/node"],
2+
"compilerOptions": {
3+
"target": "es6",
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
9+
"allowJs": true,
10+
"skipLibCheck": true,
11+
"esModuleInterop": true,
12+
"allowSyntheticDefaultImports": true,
13+
"strict": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"module": "esnext",
16+
"moduleResolution": "node",
17+
"resolveJsonModule": true,
18+
"isolatedModules": true,
19+
"noEmit": true,
20+
"jsx": "react",
21+
"types": [
22+
"@types/jest",
23+
"@types/node"
24+
],
1825
"noImplicitAny": false
19-
}
26+
},
27+
"include": [
28+
"src"
29+
]
2030
}

0 commit comments

Comments
 (0)