Skip to content

Commit

Permalink
update lerna && fix api-proxy jest
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyuki committed Aug 7, 2024
1 parent f7673bd commit fd6eb1e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: install deps
if: steps.cache.outputs.cache-hit != 'true'
run: npm i && npm i --prefix test/e2e/miniprogram-project && npm i --prefix test/e2e/plugin-project && npx lerna bootstrap --no-ci
run: npm i && npm i --prefix test/e2e/miniprogram-project && npm i --prefix test/e2e/plugin-project

- name: copy-webpack-plugin
run: npm run copyPlugin --prefix test/e2e/miniprogram-project && npm run copyPlugin --prefix test/e2e/plugin-project
Expand Down
1 change: 0 additions & 1 deletion jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"moduleNameMapper": {
"\\.(css|styl)$": "identity-obj-proxy"
},
"setupFiles": ["./test/unit/setup.js"],
"testEnvironment": "jsdom",
"testMatch": [
"**/packages/**/?(*.)+(spec|test).[jt]s?(x)"
Expand Down
3 changes: 0 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"packages": [
"packages/*"
],
"version": "2.9.48"
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
"eslint-plugin-promise": "^5.1.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^27.2.0",
"lerna": "^3.4.3",
"lerna": "^8.1.8",
"typescript": "^4.1.3",
"vuepress": "^1.9.7"
}
},
"workspaces": [
"packages/*"
]
}
2 changes: 1 addition & 1 deletion packages/api-proxy/__tests__/web/action-sheet.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import '@testing-library/jest-dom/extend-expect'
import {
showActionSheet
} from '../../src/platform/api/action-sheet/index.web'
import { dispatchTap } from '../../../../test/utils/touch'
import { dispatchTap } from '../../test/touch'

describe('test toast', () => {
afterAll(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/api-proxy/jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"globals": {
"__mpx_mode__": "web"
},
"setupFiles": ["../../test/unit/setup"]
"setupFiles": ["./test/setup"]
}
3 changes: 2 additions & 1 deletion packages/api-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
},
"homepage": "https://github.com/didi/mpx#readme",
"dependencies": {
"axios": "^1.6.7"
"axios": "^1.6.7",
"@mpxjs/utils": "^2.9.41"
},
"peerDependencies": {
"@react-native-async-storage/async-storage": "^1.23.1",
Expand Down
5 changes: 5 additions & 0 deletions test/unit/setup.js → packages/api-proxy/test/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ global.getCurrentPages = function () {
$el: document.body
}]
}

jest.mock('@mpxjs/core', () => ({
isRef: jest.fn(),
isReactive: jest.fn()
}))
File renamed without changes.

0 comments on commit fd6eb1e

Please sign in to comment.