Skip to content

Commit 4769dc6

Browse files
committed
add support for test.filter.js in watchCases
1 parent 508450a commit 4769dc6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/WatchTestCases.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ describe("WatchTestCases", () => {
5555
tests: fs
5656
.readdirSync(path.join(casesPath, cat))
5757
.filter(folder => folder.indexOf("_") < 0)
58+
.filter(testName => {
59+
const testDirectory = path.join(casesPath, cat, testName);
60+
const filterPath = path.join(testDirectory, "test.filter.js");
61+
if (fs.existsSync(filterPath) && !require(filterPath)()) {
62+
describe.skip(testName, () => it("filtered"));
63+
return false;
64+
}
65+
return true;
66+
})
5867
.sort()
5968
};
6069
});

0 commit comments

Comments
 (0)