mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-12-15 19:08:57 +00:00
Restructured Test Suite
- 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
```
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"start": "sh run-start.sh",
|
||||
"postinstall": "sh installers/postinstall/postinstall.sh",
|
||||
"test": "./node_modules/mocha/bin/mocha $(find tests -path '*js*' ! -ipath '*e2e*')",
|
||||
"test": "./node_modules/mocha/bin/mocha tests/unit --recursive",
|
||||
"test:unit": "./node_modules/mocha/bin/mocha tests/unit --recursive",
|
||||
"test:e2e": "./node_modules/mocha/bin/mocha tests/e2e --recursive"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user