Skip to content

Commit

Permalink
使用 jest 测试
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-hxl committed Nov 29, 2022
1 parent ea111b4 commit 832c41c
Show file tree
Hide file tree
Showing 9 changed files with 2,050 additions and 77 deletions.
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
{
"private": "true",
"name": "xl-store",
"version": "0.1.11",
"description": "状态管理仓库",
"author": "coderhxl",
"description": "状态管理库",
"license": "MIT",
"main": "src/index.ts",
"scripts": {
"build": "rollup --config rollup.config.mjs",
"test": "rollup --watch --config script/test.mjs",
"build-test": "node test/build-test.js",
"dev-test": "jest test/dev.test.ts",
"pro-test": "jest test/pro.test.ts",
"prettier": "prettier --write ."
},
"author": "coderhxl",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.20.2",
"@babel/preset-env": "^7.20.2",
"@jest/globals": "^29.3.1",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-run": "^3.0.1",
"@rollup/plugin-terser": "^0.1.0",
"@types/node": "^18.11.9",
"jest": "^29.3.1",
"prettier": "^2.8.0",
"rollup": "^3.5.0",
"rollup-plugin-typescript2": "^0.34.1",
"ts-jest": "^29.0.3",
"tslib": "^2.4.1",
"typescript": "^4.9.3"
}
Expand Down
Loading

0 comments on commit 832c41c

Please sign in to comment.