In the translations test now when are missing some translations for
determinated language will be show the missing string.
This can help to identified and improved the translations files.
/me listening STP: Silvergun superman
npm WARN grunt-stylelint@0.8.0 requires a peer of stylelint@^7.8.0 but
none was installed.
npm WARN stylelint-config-standard@16.0.0 requires a peer of
stylelint@^7.8.0 but none was installed.
- separated tests into e2e and unit directories
- created configs directory structure to support test framework
- added/modified `npm run test`, `npm run test:unit` and `npm run test:e2e` to target all, unit and e2e tests respectively
- modified some of the test names to be more descriptive
New structure of the Test Suite has following directory tree:
```
tests
├── configs
│ ├── env.js
│ └── modules
│ ├── clock
│ │ ├── clock_12hr.js
│ │ ├── clock_24hr.js
│ │ └── clock_showPeriodUpper.js
│ └── helloworld
│ └── helloworld.js
├── e2e
│ ├── env_spec.js
│ └── modules
│ ├── clock_spec.js
│ └── helloworld_spec.js
└── unit
├── functions
│ └── cmp_versions_spec.js
└── global_vars
└── root_path_spec.js
```
When I attempted to run e2e tests I got following error:
```
$npm run test:e2e
> magicmirror@2.1.1 test:e2e /Users/sergeym/localDev/MagicMirror
> ./node_modules/mocha/bin/mocha tests/e2e --recursive
module.js:471
throw err;
^
Error: Cannot find module 'chai-as-promised'
...
```
Adding `chai-as-promised` to `package.json` and running npm install fixes it.
@roramirez thanks for starting adding tests. I figured that we might as well grunt them and follow same rules for linting as we do for rest of JS code in the repo.
I've made following minor modifications:
- added tests to the grunt target
- fixed indentation in package.json
- made tests a bit more descriptive
- fixed eslint errors surfaced by grunt