Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 853decd

Browse files
authored
Merge pull request #3152 from github/mbg/node/individual-test-cmd
Add `npm run ava` command, update instructions, and exclude files from VSCode search
2 parents 8fca381 + 48be21c commit 853decd

15 files changed

+31
-13
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"build": true,
99
"lib": true,
1010
},
11+
"search.exclude": {
12+
"**/node_modules": true,
13+
"build": true,
14+
"lib": true,
15+
},
1116
// Installing a new Node package often triggers VS Code's git limit warnings as there is typically
1217
// an intermediate stage where many files are modified. This setting suppresses these warnings.
1318
"git.ignoreLimitWarning": true,

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Before you start, ensure that you have a recent version of node (16 or higher) i
2020
* Transpile the TypeScript to JavaScript: `npm run build`. Note that the JavaScript files are committed to git.
2121
* Run tests: `npm run test`. You’ll need to ensure that the JavaScript files are up-to-date first by running the command above.
2222
* Run the linter: `npm run lint`.
23+
* Run tests for a specific path: `npm run ava -- ./src/filename.test.ts` or `npm run ava -- ./src/feature-flags/`
2324

2425
This project also includes configuration to run tests from VSCode (with support for breakpoints) - open the test file you wish to run and choose "Debug AVA test file" from the Run menu in the Run panel.
2526

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test: build
2222

2323
# Run the tests for a single file
2424
test_file filename: build
25-
npx ava --serial --verbose {{filename}}
25+
npm run ava {{filename}}
2626

2727
[doc("Refresh the .js build artefacts in the lib directory")]
2828
[confirm]

lib/analyze-action-post.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild-action.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/resolve-environment-action.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action-post.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)