From 00566f69e6aac8ca4ca71933848ffede6c3cb53a Mon Sep 17 00:00:00 2001 From: pdsuwwz Date: Thu, 9 Jun 2022 13:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8B=20fix:=20change=20customExportCond?= =?UTF-8?q?itions=20for=20jest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jest.config.js | 6 ++++++ package.json | 2 +- pnpm-lock.yaml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/jest.config.js b/jest.config.js index 6c13a20b..1bc5a666 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,11 @@ module.exports = { testEnvironment: 'node', + testEnvironmentOptions: { + customExportConditions: [ + 'node', + 'node-addons' + ] + }, moduleFileExtensions: ['js', 'vue'], moduleNameMapper: { diff --git a/package.json b/package.json index 10462492..926d63ac 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@sucrase/jest-plugin": "^2.2.0", "@vitejs/plugin-vue": "^2.2.2", "@vue/compiler-sfc": "^3.2.31", - "@vue/test-utils": "^2.0.0-rc.18", + "@vue/test-utils": "^2.0.0", "@vue/vue3-jest": "28.0.0", "babel-jest": "^28.1.1", "babel-plugin-transform-vite-meta-env": "^1.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 80240a2b..3ff11be2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ specifiers: '@sucrase/jest-plugin': ^2.2.0 '@vitejs/plugin-vue': ^2.2.2 '@vue/compiler-sfc': ^3.2.31 - '@vue/test-utils': ^2.0.0-rc.18 + '@vue/test-utils': ^2.0.0 '@vue/vue3-jest': 28.0.0 axios: 0.27.2 babel-jest: ^28.1.1