Skip to content

Commit 70c8b50

Browse files
committed
scoped package support
1 parent 1047cca commit 70c8b50

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

testRunner.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,14 @@ function saveResults(results, validators, allTestNames, testsThatAllValidatorsFa
390390
})
391391
)
392392
});
393-
var testSummaryPath = path.join(__dirname, "/reports/", validator.name.replace('/', '--') + ".md");
393+
var testSummaryPath = path.join(__dirname, "/reports/", validator.name + ".md");
394+
if (validator.name.startsWith('@')) {
395+
const scope = validator.name.substr(0, validator.name.indexOf('/'));
396+
const scopeDir = path.join(__dirname, "/reports/", scope);
397+
if (!fs.existsSync(scopeDir)) {
398+
fs.mkdirSync(scopeDir);
399+
}
400+
}
394401
fs.writeFileSync(testSummaryPath, html);
395402
});
396403
validatorsSideEffects.forEach(function(sideEffects) {

0 commit comments

Comments
 (0)