Globing pattern test grunt (#1)

* Fix Matching patterns tests directories Grunt task of eslint

* Fix eslint errors in testsuite.

* Format one line per file in src section in Gruntfile.js
This commit is contained in:
Rodrigo Ramírez Norambuena 2017-04-03 11:47:22 -03:00 committed by fewieden
parent a74efd285c
commit 636dbe5b95
4 changed files with 31 additions and 14 deletions

View File

@ -7,10 +7,18 @@ module.exports = function(grunt) {
configFile: ".eslintrc.json" configFile: ".eslintrc.json"
}, },
target: [ target: [
"js/*.js", "modules/default/*.js", "modules/default/*/*.js", "js/*.js",
"serveronly/*.js", "*.js", "tests/*/*.js", "!modules/default/alert/notificationFx.js", "modules/default/*.js",
"!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js", "modules/default/*/*.js",
"config/*", "translations/translations.js", "vendor/vendor.js", "serveronly/*.js",
"*.js",
"tests/**/*.js",
"!modules/default/alert/notificationFx.js",
"!modules/default/alert/modernizr.custom.js",
"!modules/default/alert/classie.js",
"config/*",
"translations/translations.js",
"vendor/vendor.js",
"modules/node_modules/node_helper/index.js" "modules/node_modules/node_helper/index.js"
] ]
}, },
@ -20,7 +28,8 @@ module.exports = function(grunt) {
configFile: ".stylelintrc" configFile: ".stylelintrc"
}, },
src: [ src: [
"css/main.css", "modules/default/calendar/calendar.css", "css/main.css",
"modules/default/calendar/calendar.css",
"modules/default/clock/clock_styles.css", "modules/default/clock/clock_styles.css",
"modules/default/currentweather/currentweather.css", "modules/default/currentweather/currentweather.css",
"modules/default/weatherforcast/weatherforcast.css" "modules/default/weatherforcast/weatherforcast.css"
@ -30,8 +39,12 @@ module.exports = function(grunt) {
jsonlint: { jsonlint: {
main: { main: {
src: [ src: [
"package.json", ".eslintrc.json", ".stylelintrc", "translations/*.json", "package.json",
"modules/default/*/translations/*.json", "installers/pm2_MagicMirror.json", ".eslintrc.json",
".stylelintrc",
"translations/*.json",
"modules/default/*/translations/*.json",
"installers/pm2_MagicMirror.json",
"vendor/package.js" "vendor/package.js"
], ],
options: { options: {
@ -66,8 +79,12 @@ module.exports = function(grunt) {
} }
}, },
src: [ src: [
"README.md", "CHANGELOG.md", "LICENSE.md", "modules/README.md", "README.md",
"modules/default/**/*.md", "!modules/default/calendar/vendor/ical.js/readme.md" "CHANGELOG.md",
"LICENSE.md",
"modules/README.md",
"modules/default/**/*.md",
"!modules/default/calendar/vendor/ical.js/readme.md"
] ]
} }
}, },

View File

@ -24,8 +24,8 @@ var config = {
// Using exotic content. This is why dont accept go to JSON configuration file // Using exotic content. This is why dont accept go to JSON configuration file
(function() { (function() {
var positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third", var positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third",
"middle_center", "lower_third", "bottom_left", "bottom_center", "bottom_right", "middle_center", "lower_third", "bottom_left", "bottom_center", "bottom_right",
"bottom_bar", "fullscreen_above", "fullscreen_below"]; "bottom_bar", "fullscreen_above", "fullscreen_below"];
var modules = Array(); var modules = Array();
for (idx in positions) { for (idx in positions) {
modules.push({ modules.push({

View File

@ -63,8 +63,8 @@ describe("'global.root_path' set in js/app.js", function() {
}); });
it("should expect the global.version equals package.json file", function() { it("should expect the global.version equals package.json file", function() {
version_package = JSON.parse(fs.readFileSync("package.json", "utf8")).version; versionPackage = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
expect(this.sandbox.global.version).to.equal(version_package); expect(this.sandbox.global.version).to.equal(versionPackage);
}); });
}); });