Skip to content

Commit 5447319

Browse files
committed
allow to filter examples in test suite
filter wasm example for wasm support
1 parent 3ee016f commit 5447319

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var supportsWebAssembly = require("../../test/helpers/supportsWebAssembly");
2+
3+
module.exports = function(config) {
4+
return supportsWebAssembly();
5+
};

‎test/Examples.test.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ describe("Examples", () => {
1111
const examples = require("../examples/examples.js");
1212

1313
examples.forEach((examplePath) => {
14+
const filterPath = path.join(examplePath, "test.filter.js");
15+
if(fs.existsSync(filterPath) && !require(filterPath)()) {
16+
describe.skip(path.relative(basePath, examplePath), () => it("filtered"));
17+
return;
18+
}
1419
it("should compile " + path.relative(basePath, examplePath), function(done) {
1520
this.timeout(20000);
1621
let options = {};

0 commit comments

Comments
 (0)