add jest
This commit is contained in:
parent
1ea80cdcb6
commit
31e56d5a04
6
jest.config.js
Normal file
6
jest.config.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
transform: {'^.+\\.ts?$': 'ts-jest'},
|
||||||
|
testEnvironment: 'node',
|
||||||
|
testRegex: '/tests/.*\\.(test|spec)?\\.(ts|tsx)$',
|
||||||
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node']
|
||||||
|
};
|
||||||
@ -5,7 +5,7 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "yarn tsc -w",
|
"dev": "yarn tsc -w",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "yarn jest",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write"
|
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write"
|
||||||
},
|
},
|
||||||
@ -15,7 +15,12 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
||||||
"@typescript-eslint/parser": "^5.21.0",
|
"@typescript-eslint/parser": "^5.21.0",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.14.0",
|
||||||
|
"jest": "^27.5.1",
|
||||||
|
"prettier": "^2.6.2",
|
||||||
|
"ts-jest": "^27.1.4",
|
||||||
"typescript": "^4.6.3",
|
"typescript": "^4.6.3",
|
||||||
"prettier": "^2.6.2"
|
"@types/jest": "^27.4.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user