Skip to content

Commit ecfc4fe

Browse files
chore: fix testing of work file
1 parent 400d0d9 commit ecfc4fe

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

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 testWorkFile = getBoolean(process.env.TEST_WORK_FILE);
1718

1819
const avaCommonConfig = {
19-
files: ["tests/**/!(_)*.test.*"],
20+
files: testWorkFile ? ["tests/**/work.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_WORK_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)