Skip to content

Commit 930192c

Browse files
committed
add assertFileName check:
- enforce that lib, src, and test files have lower case names
1 parent 940dd88 commit 930192c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/syntax_test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ var bundleTestGlob = path.join(constants.pathToJasmineBundleTests, '**/*.js');
1414
// main
1515
assertJasmineSuites();
1616
assertHeaders();
17+
assertFileNames();
18+
1719

1820
// check for for focus and exclude jasmine blocks
1921
function assertJasmineSuites() {
@@ -71,6 +73,24 @@ function assertHeaders() {
7173
});
7274
}
7375

76+
// check that all file names are in lower case
77+
function assertFileNames() {
78+
var logs = [];
79+
80+
glob(combineGlobs([srcGlob, libGlob, testGlob, bundleTestGlob]), function(err, files) {
81+
files.forEach(function(file) {
82+
var base = path.basename(file);
83+
84+
if(base !== base.toLowerCase()) {
85+
logs.push(file + ' : has some non-lower-case characters.');
86+
}
87+
});
88+
89+
log(logs);
90+
});
91+
92+
}
93+
7494
function combineGlobs(arr) {
7595
return '{' + arr.join(',') + '}';
7696
}

0 commit comments

Comments
 (0)