mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-07 17:05:33 +02:00
✅ Setup jest
This commit is contained in:
parent
c1b3ae80f9
commit
9fd97ec564
3 changed files with 2043 additions and 22 deletions
6
jest.config.js
Normal file
6
jest.config.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||||||
|
module.exports = {
|
||||||
|
preset: 'ts-jest',
|
||||||
|
testEnvironment: 'node',
|
||||||
|
testMatch: ['src/**/*.test.ts'],
|
||||||
|
}
|
|
@ -8,7 +8,8 @@
|
||||||
"melon": "./dist/index.js"
|
"melon": "./dist/index.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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",
|
"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",
|
"format": "prettier . -w",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
|
@ -51,6 +52,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/cli-progress": "^3.9.2",
|
"@types/cli-progress": "^3.9.2",
|
||||||
"@types/fs-extra": "^9.0.13",
|
"@types/fs-extra": "^9.0.13",
|
||||||
|
"@types/jest": "^27.0.3",
|
||||||
"@types/listr": "^0.14.4",
|
"@types/listr": "^0.14.4",
|
||||||
"@types/node": "^14.14.16",
|
"@types/node": "^14.14.16",
|
||||||
"@types/prompts": "^2.0.14",
|
"@types/prompts": "^2.0.14",
|
||||||
|
@ -65,7 +67,9 @@
|
||||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||||
"eslint-plugin-react": "^7.21.5",
|
"eslint-plugin-react": "^7.21.5",
|
||||||
"eslint-plugin-react-hooks": "^1.7.0",
|
"eslint-plugin-react-hooks": "^1.7.0",
|
||||||
|
"jest": "^27.4.5",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
|
"ts-jest": "^27.1.2",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue