Skip to content

Commit d0c957d

Browse files
committed
fix: babel-plugin-transform-taroapi test
1 parent dd25cdb commit d0c957d

File tree

3 files changed

+32
-8
lines changed

3 files changed

+32
-8
lines changed

packages/babel-plugin-transform-taroapi/jest.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { resolve } from 'node:path'
2+
13
import type { Config } from 'jest'
24

35
const config: Config = {
@@ -9,6 +11,9 @@ const config: Config = {
911
testPathIgnorePatterns: [
1012
'node_modules',
1113
],
14+
moduleNameMapper: {
15+
'@tarojs/plugin-platform-h5/dist/definition.json': resolve(__dirname, '..', 'taro-platform-h5/dist/definition.json')
16+
},
1217
transform: {
1318
'^.+\\.jsx?$': 'babel-jest',
1419
'^.+\\.tsx?$': ['ts-jest', {

packages/babel-plugin-transform-taroapi/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"lodash": "^4.17.21"
2323
},
2424
"devDependencies": {
25-
"@tarojs/plugin-platform-h5": "workspace:*",
2625
"@babel/core": "7.24.4",
2726
"@babel/types": "7.24.0",
2827
"@types/babel__core": "7.20.5"

pnpm-lock.yaml

Lines changed: 27 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)