From 4672fb5b218e893c46d6cf7ceaffed897a308a64 Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Sat, 2 Nov 2019 17:55:32 +0800 Subject: [PATCH] fix jest config --- package.json | 1 + packages/saber/jest.config.js | 4 ++++ packages/saber/package.json | 3 +-- yarn.lock | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 packages/saber/jest.config.js diff --git a/package.json b/package.json index ee3df538e..841e9256e 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "enquirer": "^2.3.1", "eslint": "^6.6.0", "husky": "3.0.5", + "jest": "^24.9.0", "lerna": "3.16.4", "lint-staged": "8.1.6", "prettier": "1.18.2", diff --git a/packages/saber/jest.config.js b/packages/saber/jest.config.js new file mode 100644 index 000000000..20821eedd --- /dev/null +++ b/packages/saber/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + testPathIgnorePatterns: ['/node_modules/', '/types/'], + testEnvironment: 'node' +} diff --git a/packages/saber/package.json b/packages/saber/package.json index 7d209e6a7..af6cc3bd2 100644 --- a/packages/saber/package.json +++ b/packages/saber/package.json @@ -10,7 +10,7 @@ "/declarations.d.ts" ], "scripts": { - "test": "tsc && jest --env node", + "test": "tsc && jest", "prepublishOnly": "yarn build", "build": "tsc", "lint": "eslint src --ext js,ts", @@ -80,7 +80,6 @@ "@types/lodash.merge": "^4.6.6", "@types/resolve-from": "5.0.1", "@types/webpack": "4.39.1", - "jest": "24.9.0", "markdown-it-footnote": "3.0.2" }, "engines": { diff --git a/yarn.lock b/yarn.lock index 795bc7a17..33a50905f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7540,7 +7540,7 @@ jest-worker@^24.6.0, jest-worker@^24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" -jest@24.9.0: +jest@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest/-/jest-24.9.0.tgz#987d290c05a08b52c56188c1002e368edb007171" integrity sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw==