Skip to content

Commit 97e93e5

Browse files
committed
Adding file name validation to the test suite.
1 parent bf0b9ed commit 97e93e5

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

Gruntfile.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ module.exports = function(grunt) {
4343
node_env: 'production'
4444
}
4545
}
46+
},
47+
48+
path_validator: {
49+
js: {
50+
src: [
51+
'{server,test}/**/*[A-Z]*.js',
52+
'!**/node_modules/**/*.js'
53+
]
54+
}
4655
}
4756
});
4857

@@ -60,6 +69,8 @@ module.exports = function(grunt) {
6069
}, 500);
6170
});
6271

72+
grunt.registerTask('style', ['path_validator']);
73+
6374
grunt.registerTask('serve', ['express:dev', 'watch']);
6475
grunt.registerTask('heroku', ['serve']);
6576

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ install:
1919
- npm install
2020

2121
test_script:
22-
- npm run appveyor
22+
- npm test
2323

2424
build: off

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"chai-shallow-deep-equal": "^1.3.0",
3030
"coveralls": "^2.11.2",
3131
"grunt-contrib-watch": "~0.5.2",
32+
"grunt-path-validator": "^1.0.1",
3233
"istanbul": "^0.3.7",
3334
"jscs": "^1.11.3",
3435
"jshint": "^2.6.3",
@@ -46,8 +47,7 @@
4647
},
4748
"scripts": {
4849
"start": "grunt serve",
49-
"test": "mocha --color",
50-
"travis": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
51-
"appveyor": "mocha --color"
50+
"test": "grunt style && mocha --color",
51+
"travis": "grunt style && istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
5252
}
5353
}

0 commit comments

Comments
 (0)