test setup

This commit is contained in:
Matthias Kretschmann 2023-09-28 21:27:26 +01:00
parent 475679419f
commit 8ab2e492f0
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 8 additions and 11 deletions

View File

@ -1,6 +1,6 @@
node_modules
src
.babelrc
test
babel.config.json
.editorconfig
.eslintrc
.travis.yml

View File

@ -9,7 +9,7 @@
"scripts": {
"build": "cross-env NODE_ENV=production babel src --out-dir .",
"start": "babel -w src --out-dir .",
"test": "npm run lint && jest --coverage",
"test": "npm run lint && jest --coverage --config ./test/jest.config.json",
"lint": "eslint ./{src,test}/**/*.js",
"format": "prettier --write '{src,test}/**/*.{js,jsx}'",
"release": "release-it --non-interactive",
@ -40,14 +40,6 @@
"engines": {
"node": ">=18"
},
"jest": {
"transform": {
"^.+\\.[t|j]sx?$": "babel-jest"
},
"transformIgnorePatterns": [
"node_modules/(?!chalk/.*)"
]
},
"repository": "github:kremalicious/gatsby-redirect-from",
"bugs": {
"url": "https://github.com/kremalicious/gatsby-redirect-from/issues"

5
test/jest.config.json Normal file
View File

@ -0,0 +1,5 @@
{
"rootDir": "../",
"coverageDirectory": "<rootDir>/coverage/",
"transformIgnorePatterns": ["node_modules/(?!chalk/.*)"]
}