Added test coverage with istanbul

This commit is contained in:
rejas
2020-07-09 20:29:38 +02:00
parent 862bf78e63
commit d570f910f8
4 changed files with 868 additions and 7 deletions

6
.gitignore vendored
View File

@@ -1,5 +1,4 @@
# Various Node ignoramuses.
logs
*.log
npm-debug.log*
@@ -13,9 +12,11 @@ build/Release
/node_modules/**/*
fonts/node_modules/**/*
vendor/node_modules/**/*
!/tests/node_modules/**/*
jspm_modules
.npm
.node_repl_history
.nyc_output/
# Visual Studio Code ignoramuses.
.vscode/
@@ -53,7 +54,6 @@ Temporary Items
.apdisk
# Various Linux ignoramuses.
.fuse_hidden*
.directory
.Trash-*
@@ -76,5 +76,3 @@ Temporary Items
*.orig
*.rej
*.bak
!/tests/node_modules/**/*

View File

@@ -11,6 +11,8 @@ _This release is scheduled to be released on 2020-10-01._
### Added
- Test coverage with Istanbul, run it with `npm run test:coverage`
### Updated
- Change incorrect weather.js default properties.

859
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,9 +9,10 @@
"install": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error",
"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error",
"postinstall": "npm run install-fonts && echo \"MagicMirror installation finished successfully! \n\"",
"test": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests --recursive",
"test:unit": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests/unit --recursive",
"test:e2e": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests/e2e --recursive",
"test": "NODE_ENV=test mocha tests --recursive",
"test:coverage": "NODE_ENV=test nyc mocha tests --recursive --timeout=3000",
"test:e2e": "NODE_ENV=test mocha tests/e2e --recursive",
"test:unit": "NODE_ENV=test mocha tests/unit --recursive",
"test:prettier": "prettier --check **/*.{js,css,json,md,yml}",
"test:js": "eslint *.js js/**/*.js modules/default/**/*.js clientonly/*.js serveronly/*.js translations/*.js vendor/*.js tests/**/*.js config/* --config .eslintrc.json --quiet",
"test:css": "stylelint css/main.css modules/default/**/*.css --config .stylelintrc.json",
@@ -54,6 +55,7 @@
"mocha": "^7.1.2",
"mocha-each": "^2.0.1",
"mocha-logger": "^1.0.6",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"spectron": "^8.0.0",