Added settings for jest

This commit is contained in:
Alexander Cerutti
2023-04-04 21:05:25 +02:00
parent 8c7eea3168
commit c645a3fb14
3 changed files with 15 additions and 2 deletions

View File

@@ -3,5 +3,7 @@
"editor.formatOnSave": true,
"editor.insertSpaces": false,
"editor.smoothScrolling": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"jest.jestCommandLine": "node --no-warnings ./node_modules/.bin/jest -c jest.config.cjs --runInBand --silent"
}

11
jest.config.cjs Normal file
View File

@@ -0,0 +1,11 @@
// @ts-check
/**
* @type {import("jest").Config}
*/
module.exports = {
moduleFileExtensions: ["js", "mjs", "cjs"],
testEnvironment: "node",
testMatch: ["**/specs/**/*.spec.cjs"],
};

View File

@@ -9,7 +9,7 @@
"build:src": "rimraf lib && npx tsc -p tsconfig.dist.json",
"build:spec": "rimraf \"./spec/*.!(ts)\" && npx tsc -p tsconfig.spec.json",
"prepublishOnly": "npm run build",
"test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest -c jest.config.mjs --silent"
"test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest -c jest.config.cjs --silent"
},
"author": "Alexander Patrick Cerutti",
"license": "MIT",