Skip to content

Commit

Permalink
handle optionally missing status files
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Dec 12, 2022
1 parent a871ee5 commit f9de90d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/common/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,15 @@ class StatusLoader {
load() {
const dir = path.join(__dirname, '..', 'wpt');
const statusFile = path.join(dir, 'status', `${this.path}.js`);
const result = require(statusFile);
let result;
try {
result = require(statusFile);
} catch (err) {
if (err.code !== 'MODULE_NOT_FOUND') {
throw err;
}
result = {};
}
this.rules.addRules(result);

const subDir = fixtures.path('wpt', this.path);
Expand Down

0 comments on commit f9de90d

Please sign in to comment.