Skip to content

Commit

Permalink
allow filtering of tests in statsCases
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jul 2, 2018
1 parent 1ad71e0 commit 5b30ede
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/StatsTestCases.test.js
Expand Up @@ -15,7 +15,16 @@ const tests = fs
testName =>
fs.existsSync(path.join(base, testName, "index.js")) ||
fs.existsSync(path.join(base, testName, "webpack.config.js"))
);
)
.filter(testName => {
const testDirectory = path.join(base, testName);
const filterPath = path.join(testDirectory, "test.filter.js");
if (fs.existsSync(filterPath) && !require(filterPath)()) {
describe.skip(testName, () => it("filtered"));
return false;
}
return true;
});

describe("StatsTestCases", () => {
tests.forEach(testName => {
Expand Down

0 comments on commit 5b30ede

Please sign in to comment.