Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit d760044

Browse files
jimfmarkelog
authored andcommitted
Misc: fix dynamic test requires
When reading in test files from the directory, omit non-js files before attempting to `require` them Closes gh-2132
1 parent 60caf4f commit d760044

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/specs/grouping.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ describe.skip('rule grouping', function() {
1515
}, {});
1616

1717
describe('exists for every rule', function() {
18-
fs.readdirSync(rulesDir).map(function(file) {
18+
fs.readdirSync(rulesDir).filter(function(file) {
19+
return file.slice(-3) === '.js';
20+
}).map(function(file) {
1921
var Rule = require(path.join(rulesDir, file));
2022
return Rule.prototype.getOptionName.call();
2123
}).forEach(function(option) {

0 commit comments

Comments
 (0)