Skip to content

Commit

Permalink
tests: re-run tests for integration/rule html files in develop mode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Jan 4, 2021
1 parent f318a2c commit 8c34175
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ var testPaths = [];
if (testFiles.length) {
testPaths = testFiles.map(function(file) {
var basename = path.basename(file);
var extname = path.extname(file);

// do not transform test files
// do not transform test files unless it is the integration/rule
// html, in which case run the json test file
if (file.includes('test/')) {
if (file.includes('integration/rules') && extname === '.html') {
return file.replace('.html', '.json');
}

return file;
} else if (file.includes('lib/checks') || file.includes('lib/commons')) {
var filePath = file.replace('lib/', 'test/');
Expand Down

0 comments on commit 8c34175

Please sign in to comment.