feat: set up jest

pull/25/head
An Phan 5 years ago committed by =
parent 83fc842ae4
commit ed2e52f3b1

@ -0,0 +1,12 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
globals: {
'ts-jest': {
tsConfig: 'src/tsconfig.json'
}
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
}
}

@ -34,7 +34,8 @@
"build": "rimraf -rf dist && tsc -p src/client && tsc -p src/node && node scripts/copy",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"prepublishOnly": "yarn build && yarn changelog",
"postpublish": "git add CHANGELOG.md && git commit -m 'chore: changelog [ci skip]'"
"postpublish": "git add CHANGELOG.md && git commit -m 'chore: changelog [ci skip]'",
"test": "jest"
},
"engines": {
"node": ">=10.0.0"
@ -75,16 +76,20 @@
},
"devDependencies": {
"@types/fs-extra": "^8.1.0",
"@types/jest": "^26.0.3",
"@types/lru-cache": "^5.1.0",
"@types/markdown-it": "^10.0.1",
"@types/node": "^13.13.4",
"@types/postcss-load-config": "^2.0.1",
"chokidar": "^3.4.0",
"conventional-changelog-cli": "^2.0.31",
"jest": "^26.0.1",
"jest-each": "^26.0.1",
"lint-staged": "^10.2.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"ts-jest": "^26.1.1",
"typescript": "^3.8.3",
"yorkie": "^2.0.0"
}

@ -0,0 +1,25 @@
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "../dist",
"module": "commonjs",
"lib": ["ESNext", "DOM"],
"sourceMap": false,
"target": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"declaration": true,
"allowJs": true,
"checkJs": true,
"allowSyntheticDefaultImports": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"noImplicitAny": true,
"removeComments": false,
"preserveSymlinks": true,
"paths": {
"@/*": ["./*"]
}
},
"include": ["."]
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save