Skip to content

Commit

Permalink
fix: vue transform in jest for material design icons
Browse files Browse the repository at this point in the history
* Update vue-jest to the current.
* Update vue-material-design-icons to the latest.
* specify `transformIgnorePatterns` in jest config
  to ensure files in vue-material-design-icons are transformed

By default vue-jest ignores all files in node_modules.
So we need to be a bit more specific.

Signed-off-by: Azul <azul@riseup.net>
  • Loading branch information
azul authored and Julien Veyssier committed Jan 6, 2022
1 parent 58d9389 commit 45cd4fc
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 346 deletions.
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/vendors.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/vendors.js.map

Large diffs are not rendered by default.

415 changes: 91 additions & 324 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"tiptap-utils": "^1.13.1",
"vue": "^2.6.14",
"vue-click-outside": "^1.0.7",
"vue-material-design-icons": "^4.13.0",
"vue-material-design-icons": "^5.0.0",
"vuex": "^3.6.2"
},
"engines": {
Expand All @@ -73,13 +73,13 @@
"@nextcloud/stylelint-config": "^2.0.1",
"@nextcloud/webpack-vue-config": "^4.2.0",
"@vue/test-utils": "^1.3.0",
"@vue/vue2-jest": "^27.0.0-alpha.4",
"babel-core": "^7.0.0-bridge.0",
"cypress": "^9.1.1",
"jest": "^27.4.5",
"jest-environment-jsdom": "^27.4.4",
"jest-serializer-vue": "^2.0.2",
"regenerator-runtime": "^0.13.9",
"vue-jest": "^3.0.7"
"regenerator-runtime": "^0.13.9"
},
"jest": {
"verbose": true,
Expand All @@ -97,13 +97,16 @@
],
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
".*\\.(vue)$": "<rootDir>/node_modules/@vue/vue2-jest"
},
"snapshotSerializers": [
"<rootDir>/node_modules/jest-serializer-vue"
],
"setupFilesAfterEnv": [
"<rootDir>/src/tests/setup.js"
],
"transformIgnorePatterns": [
"/node_modules/(?!vue-material-design-icons)"
]
}
}

0 comments on commit 45cd4fc

Please sign in to comment.