Skip to content

Commit 5ce1f0f

Browse files
chore: fix testing of work file
1 parent 62b1242 commit 5ce1f0f

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.vscode/launch.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
"skipFiles": [
1717
"<node_internals>/**/*.js"
1818
],
19+
"env": {
20+
"TEST_ALL_FILE": "1"
21+
},
1922
"sourceMaps": true,
2023
"console": "integratedTerminal",
2124
"internalConsoleOptions": "neverOpen",

ava.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ function getBoolean(value) {
1414
}
1515

1616
const useCompiledTests = getBoolean(process.env.USE_COMPILED_TESTS);
17+
const testAllFile = getBoolean(process.env.TEST_ALL_FILE);
1718

1819
const avaCommonConfig = {
19-
files: ["tests/**/!(_)*.test.*"],
20+
files: testAllFile ? ["tests/**/*.test.*"] : ["tests/**/!(work)*.test.*"],
2021
timeout: "5m",
2122
};
2223

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"lint": "eslint .",
5252
"lint-fix": "yarn lint --fix",
5353
"test": "nyc ava",
54-
"test-work": "ava 'tests/rules/_work.test.ts'",
54+
"test-work": "TEST_ALL_FILE=1 ava",
5555
"verify": "yarn build && yarn lint && yarn build-tests && yarn test-compiled && rimraf build",
5656
"preversion": "yarn verify",
5757
"version": "auto-changelog -p && git add CHANGELOG.md",
File renamed without changes.

0 commit comments

Comments
 (0)