From 21b0037ca6161c916dfe473e67b18652fc4af736 Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Wed, 19 Apr 2023 10:49:55 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8A=A0=E5=85=A5=E9=9D=99=E6=80=81?= =?UTF-8?q?=E8=B5=84=E6=BA=90transform?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jest.config.js | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/jest.config.js b/jest.config.js index 274d7f1..536f845 100644 --- a/jest.config.js +++ b/jest.config.js @@ -37,6 +37,7 @@ module.exports = { tsconfig: './tsconfig.test.json', }, ], + '.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub', }, // 定义了忽略进行 jest 执行的依赖包 diff --git a/package.json b/package.json index 637365b..1051a04 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "eslint-plugin-import": "^2.22.0", "husky": "^8.0.3", "jest": "^29.5.0", + "jest-transform-stub": "^2.0.0", "lint-staged": "^13.1.0", "prettier": "^2.8.3", "prismjs": "^1.29.0",