1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 20:19:30 +00:00

Added jest testing framework

This commit is contained in:
2022-01-20 16:55:11 +00:00
parent 0fa2310f39
commit 58350e032f
5 changed files with 6797 additions and 4 deletions

View File

@@ -5,7 +5,10 @@
"es2021": true, "es2021": true,
"node": true "node": true
}, },
"extends": "eslint:recommended", "extends": [
"eslint:recommended",
"plugin:jest/recommended"
],
"parserOptions": { "parserOptions": {
"ecmaVersion": "latest" "ecmaVersion": "latest"
}, },

2
.gitignore vendored
View File

@@ -1,5 +1,7 @@
static/assets/diagrams/ static/assets/diagrams/
coverage/
node_modules/ node_modules/
config/*.json config/*.json

11
jest.config.js Normal file
View File

@@ -0,0 +1,11 @@
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
module.exports = {
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8'
};

6777
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "jest"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -21,6 +21,8 @@
"mysql2": "^2.3.3" "mysql2": "^2.3.3"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.6.0" "eslint": "^8.6.0",
"eslint-plugin-jest": "^25.7.0",
"jest": "^27.4.7"
} }
} }