Skip to content

Commit

Permalink
feat: switch to OOTB platformWorkspaceApi mock
Browse files Browse the repository at this point in the history
  • Loading branch information
pozil committed Jul 2, 2024
1 parent 9d4abe2 commit fe1a27b
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 166 deletions.
26 changes: 0 additions & 26 deletions force-app/test/jest-mocks/lightning/platformWorkspaceApi.js

This file was deleted.

4 changes: 1 addition & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ module.exports = {
'^lightning/modal$':
'<rootDir>/force-app/test/jest-mocks/lightning/modal',
'^lightning/refresh$':
'<rootDir>/force-app/test/jest-mocks/lightning/refresh',
'^lightning/platformWorkspaceApi$':
'<rootDir>/force-app/test/jest-mocks/lightning/platformWorkspaceApi'
'<rootDir>/force-app/test/jest-mocks/lightning/refresh'
},
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv,
Expand Down
189 changes: 55 additions & 134 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test:unit:coverage": "sfdx-lwc-jest --coverage --skipApiVersionCheck",
"prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"",
"prettier:verify": "prettier --check \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"",
"postinstall": "husky install",
"prepare": "husky || true",
"precommit": "lint-staged"
},
"lint-staged": {
Expand Down Expand Up @@ -42,8 +42,8 @@
"@salesforce/sfdx-lwc-jest": "^5.1.0",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"husky": "^8.0.3",
"eslint-plugin-jest": "^28.6.0",
"husky": "^9.0.11",
"jest-canvas-mock": "^2.5.2",
"lint-staged": "^15.2.7",
"prettier": "^3.3.2",
Expand Down

0 comments on commit fe1a27b

Please sign in to comment.