File tree Expand file tree Collapse file tree 5 files changed +29
-21
lines changed Expand file tree Collapse file tree 5 files changed +29
-21
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ npm run build
93
93
Run the tests
94
94
95
95
``` bash
96
- npm run test
96
+ npm test
97
97
npm run e2e
98
98
```
99
99
@@ -104,6 +104,7 @@ npm run prettier
104
104
npm run prettier:fix
105
105
npm run lint
106
106
npm run lint:fix
107
+ npm run type-check
107
108
```
108
109
109
110
## Pull Request Process
Original file line number Diff line number Diff line change @@ -61,29 +61,16 @@ client
61
61
62
62
### Unit tests
63
63
64
- ``` bash
65
- npm run test
66
- ```
67
-
68
- You can specify a specific test to run by changing ` package.json ` :
64
+ You can run all unit tests, or specify a specific test to run:
69
65
70
- ``` json
71
- "scripts" : {
72
- "test" : " nyc --reporter=lcov mocha 'tests/unit/result/JsonResult.test.js'" ,
73
- }
74
- ```
75
-
76
- Or to run all unit tests:
77
-
78
- ``` json
79
- "scripts" : {
80
- "test" : " nyc --reporter=lcov mocha 'tests/unit/**/*.test.js'" ,
81
- }
66
+ ``` bash
67
+ npm test
68
+ npm test < path/to/file.test.js>
82
69
```
83
70
84
71
### e2e tests
85
72
86
- Before running end-to-end tests, copy the [ sample configuration file ] ( tests/e2e/utils/config.js ) into the repository root and set the Databricks SQL connection info:
73
+ Before running end-to-end tests, create a file named ` tests/e2e/utils/config.local.js ` and set the Databricks SQL connection info:
87
74
88
75
``` javascript
89
76
{
@@ -98,6 +85,7 @@ Then run
98
85
99
86
``` bash
100
87
npm run e2e
88
+ npm run e2e < path/to/file.test.js>
101
89
```
102
90
103
91
## Contributing
Original file line number Diff line number Diff line change 13
13
},
14
14
"scripts" : {
15
15
"prepare" : " npm run build" ,
16
- "e2e" : " nyc --reporter=lcov --report-dir=coverage_e2e mocha ' tests/e2e/**/*.test .js' --timeout=300000 " ,
17
- "test" : " nyc --reporter=lcov --report-dir=coverage_unit mocha ' tests/unit/**/*.test .js' " ,
16
+ "e2e" : " nyc --reporter=lcov --report-dir=coverage_e2e mocha --config tests/e2e/.mocharc .js" ,
17
+ "test" : " nyc --reporter=lcov --report-dir=coverage_unit mocha --config tests/unit/.mocharc .js" ,
18
18
"build" : " tsc" ,
19
19
"watch" : " tsc -w" ,
20
20
"type-check" : " tsc --noEmit" ,
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const allSpecs = 'tests/e2e/**/*.test.js' ;
4
+
5
+ const argvSpecs = process . argv . slice ( 4 ) ;
6
+
7
+ module . exports = {
8
+ spec : argvSpecs . length > 0 ? argvSpecs : allSpecs ,
9
+ timeout : '300000' ,
10
+ } ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const allSpecs = 'tests/unit/**/*.test.js' ;
4
+
5
+ const argvSpecs = process . argv . slice ( 4 ) ;
6
+
7
+ module . exports = {
8
+ spec : argvSpecs . length > 0 ? argvSpecs : allSpecs ,
9
+ } ;
You can’t perform that action at this time.
0 commit comments