MT#58893 Fix build failures for missing jest module

The jest module cannot be found after the update due
to a wrong transformation:

07:46:39 yarn run v1.22.19
07:46:39 $ jest --updateSnapshot
07:46:39 ● Validation Error:
07:46:39
07:46:39   Module vue-jest in the transform option was not found.
07:46:39          <rootDir> is: /tmp/code
07:46:39
07:46:39   Configuration Documentation:
07:46:39   https://jestjs.io/docs/configuration

This commit fixes the transformation and points to the new
'@vue/vue3-jest'

Change-Id: If781a23155352d0e3275c064bbca92d17076dbad
mr12.2
Hugo Zigha 1 year ago
parent 5f1e582217
commit 8975d7869e

@ -20,6 +20,7 @@ module.exports = {
'<rootDir>/src/**/*.ts',
'<rootDir>/src/**/*.jsx'
],
coveragePathIgnorePatterns: ['/node_modules/', '.d.ts$'],
coverageThreshold: {
global: {
// branches: 50,
@ -47,14 +48,14 @@ module.exports = {
'.*css$': '<rootDir>/test/jest/utils/stub.css'
},
transform: {
'.*\\.vue$': 'vue-jest',
'.*\\.js$': 'babel-jest',
'.*\\.vue$': '<rootDir>/node_modules/@vue/vue3-jest',
'.*\\.js$': '<rootDir>/node_modules/babel-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub'
// use these if NPM is being flaky
// '.*\\.vue$': '<rootDir>/node_modules/@quasar/quasar-app-extension-testing-unit-jest/node_modules/vue-jest',
// '.*\\.js$': '<rootDir>/node_modules/@quasar/quasar-app-extension-testing-unit-jest/node_modules/babel-jest'
},
transformIgnorePatterns: [`<rootDir>/node_modules/(?!(${esModules}))`],
transformIgnorePatterns: [`node_modules/(?!(${esModules}))`],
snapshotSerializers: [
'<rootDir>/node_modules/jest-serializer-vue'
],

@ -63,6 +63,7 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.0.0",
"@babel/plugin-transform-private-methods": "7.23.3",
"@quasar/app-webpack": "3",
"@quasar/cli": "1.3.2",
"@quasar/quasar-app-extension-testing": "1.0.5",
@ -85,6 +86,7 @@
"glob": "7.1.6",
"is-valid-glob": "1.0.0",
"jest": "29.7.0",
"jest-serializer-vue": "3.1.0",
"js-yaml": "3.14.1",
"parseuri": "^0.0.6",
"stylus": "0.59.0",

@ -5,7 +5,7 @@ FROM docker.mgm.sipwise.com/sipwise-bookworm:latest
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT 2023-06-26
ENV REFRESHED_AT 2023-12-01
ENV NODE_PATH=/usr/lib/nodejs:/usr/share/nodejs
ENV DEBIAN_FRONTEND noninteractive

@ -5,8 +5,6 @@ jest.setTimeout(1000)
// jest speedup when errors are part of the game
// Error.stackTraceLimit = 0
global.Promise = require('promise')
/*
import chai from 'chai'
// Make sure chai and jasmine ".not" play nice together

@ -839,6 +839,14 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-transform-private-methods@7.23.3":
version "7.23.3"
resolved "https://npm-registry.sipwise.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz#b2d7a3c97e278bfe59137a978d53b2c2e038c0e4"
integrity sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==
dependencies:
"@babel/helper-create-class-features-plugin" "^7.22.15"
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-transform-private-methods@^7.22.5":
version "7.22.5"
resolved "https://npm-registry.sipwise.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz#21c8af791f76674420a147ae62e9935d790f8722"
@ -4139,6 +4147,15 @@ concat-map@0.0.1:
resolved "https://npm-registry.sipwise.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
condense-newlines@^0.2.1:
version "0.2.1"
resolved "https://npm-registry.sipwise.com/condense-newlines/-/condense-newlines-0.2.1.tgz#3de985553139475d32502c83b02f60684d24c55f"
integrity sha512-P7X+QL9Hb9B/c8HI5BFFKmjgBu2XpQuF98WZ9XkO+dBGgk5XgwiQz7o1SmpglNWId3581UcS0SFAWfoIhMHPfg==
dependencies:
extend-shallow "^2.0.1"
is-whitespace "^0.3.0"
kind-of "^3.0.2"
config-chain@^1.1.11, config-chain@^1.1.13:
version "1.1.13"
resolved "https://npm-registry.sipwise.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4"
@ -4344,6 +4361,7 @@ cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
which "^2.0.1"
crypto-browserify@^3.12.0, "crypto@npm:crypto-browserify":
name crypto
version "3.12.0"
resolved "https://npm-registry.sipwise.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==
@ -6314,7 +6332,7 @@ glob@7.1.6:
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^10.2.2, glob@^10.2.7:
glob@^10.2.2, glob@^10.2.7, glob@^10.3.3:
version "10.3.10"
resolved "https://npm-registry.sipwise.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b"
integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==
@ -7363,6 +7381,11 @@ is-weakref@^1.0.2:
dependencies:
call-bind "^1.0.2"
is-whitespace@^0.3.0:
version "0.3.0"
resolved "https://npm-registry.sipwise.com/is-whitespace/-/is-whitespace-0.3.0.tgz#1639ecb1be036aec69a54cbb401cfbed7114ab7f"
integrity sha512-RydPhl4S6JwAyj0JJjshWJEFG6hNye3pZFBRZaTUfZFwGHxzppNaNOVgQuS/E/SlhrApuMXrpnK1EEIXfdo3Dg==
is-windows@^1.0.2:
version "1.0.2"
resolved "https://npm-registry.sipwise.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
@ -7785,6 +7808,13 @@ jest-runtime@^29.7.0:
slash "^3.0.0"
strip-bom "^4.0.0"
jest-serializer-vue@3.1.0:
version "3.1.0"
resolved "https://npm-registry.sipwise.com/jest-serializer-vue/-/jest-serializer-vue-3.1.0.tgz#af65817aa416d019f837b6cc53f121a3222846f4"
integrity sha512-vXz9/3IgBbLhsaVANYLG4ROCQd+Wg3qbB6ICofzFL+fbhSFPlqb0/MMGXcueVsjaovdWlYiRaLQLpdi1PTcoRQ==
dependencies:
pretty "2.0.0"
jest-snapshot@^29.7.0:
version "29.7.0"
resolved "https://npm-registry.sipwise.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5"
@ -7902,6 +7932,16 @@ js-beautify@1.14.9:
glob "^8.1.0"
nopt "^6.0.0"
js-beautify@^1.6.12:
version "1.14.11"
resolved "https://npm-registry.sipwise.com/js-beautify/-/js-beautify-1.14.11.tgz#57b17e009549ac845bdc58eddf8e1862e311314e"
integrity sha512-rPogWqAfoYh1Ryqqh2agUpVfbxAhbjuN1SmU86dskQUKouRiggUTCO4+2ym9UPXllc2WAp0J+T5qxn7Um3lCdw==
dependencies:
config-chain "^1.1.13"
editorconfig "^1.0.3"
glob "^10.3.3"
nopt "^7.2.0"
js-tokens@^4.0.0:
version "4.0.0"
resolved "https://npm-registry.sipwise.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
@ -10152,6 +10192,15 @@ pretty-format@^29.7.0:
ansi-styles "^5.0.0"
react-is "^18.0.0"
pretty@2.0.0:
version "2.0.0"
resolved "https://npm-registry.sipwise.com/pretty/-/pretty-2.0.0.tgz#adbc7960b7bbfe289a557dc5f737619a220d06a5"
integrity sha512-G9xUchgTEiNpormdYBl+Pha50gOUovT18IvAe7EYMZ1/f9W/WWMPRn+xI68yXNMUk3QXHDwo/1wV/4NejVNe1w==
dependencies:
condense-newlines "^0.2.1"
extend-shallow "^2.0.1"
js-beautify "^1.6.12"
private@^0.1.8:
version "0.1.8"
resolved "https://npm-registry.sipwise.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
@ -11342,6 +11391,7 @@ statuses@2.0.1:
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
stream-browserify@^3.0.0, "stream@npm:stream-browserify":
name stream
version "3.0.0"
resolved "https://npm-registry.sipwise.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f"
integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==
@ -12628,6 +12678,7 @@ wordwrap@^1.0.0:
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
name wrap-ansi-cjs
version "7.0.0"
resolved "https://npm-registry.sipwise.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==

Loading…
Cancel
Save