File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ npm run build
9393Run the tests
9494
9595``` bash
96- npm run test
96+ npm test
9797npm run e2e
9898```
9999
@@ -104,6 +104,7 @@ npm run prettier
104104npm run prettier:fix
105105npm run lint
106106npm run lint:fix
107+ npm run type-check
107108```
108109
109110## Pull Request Process
Original file line number Diff line number Diff line change @@ -61,29 +61,16 @@ client
6161
6262### Unit tests
6363
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:
6965
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>
8269```
8370
8471### e2e tests
8572
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:
8774
8875``` javascript
8976{
@@ -98,6 +85,7 @@ Then run
9885
9986``` bash
10087npm run e2e
88+ npm run e2e < path/to/file.test.js>
10189```
10290
10391## Contributing
Original file line number Diff line number Diff line change 1313 },
1414 "scripts" : {
1515 "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" ,
1818 "build" : " tsc" ,
1919 "watch" : " tsc -w" ,
2020 "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