Setup jest

This commit is contained in:
trickypr 2021-12-26 11:42:50 +11:00
parent c1b3ae80f9
commit 9fd97ec564
3 changed files with 2043 additions and 22 deletions

6
jest.config.js Normal file
View file

@ -0,0 +1,6 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['src/**/*.test.ts'],
}

View file

@ -8,7 +8,8 @@
"melon": "./dist/index.js"
},
"scripts": {
"test": "echo \"Error: no test specified\"",
"test": "jest",
"test:dev": "jest --watch",
"build": "rm -rf dist/ && tsc && echo \"#!/usr/bin/env node\"|cat - ./dist/index.js > /tmp/out && mv /tmp/out ./dist/index.js && chmod +x ./dist/index.js",
"format": "prettier . -w",
"lint": "eslint .",
@ -51,6 +52,7 @@
"devDependencies": {
"@types/cli-progress": "^3.9.2",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.0.3",
"@types/listr": "^0.14.4",
"@types/node": "^14.14.16",
"@types/prompts": "^2.0.14",
@ -65,7 +67,9 @@
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^1.7.0",
"jest": "^27.4.5",
"prettier": "^2.2.1",
"ts-jest": "^27.1.2",
"typescript": "^4.1.3"
}
}

2053
yarn.lock

File diff suppressed because it is too large Load diff