jonathanpmartins / v-money3

Vue3 currency input/directive mask
MIT License
103 stars 27 forks source link

Testing errors preventing new features. #80

Closed jonathanpmartins closed 1 year ago

jonathanpmartins commented 1 year ago

Updating development dependencies to these versions:

{
  "devDependencies": {
    "@babel/plugin-transform-runtime": "7.21.0",
    "@babel/preset-env": "7.20.2",
    "@types/jest": "29.5.0",
    "@types/jest-environment-puppeteer": "5.0.3",
    "@types/puppeteer": "5.4.7",
    "@typescript-eslint/eslint-plugin": "5.55.0",
    "@typescript-eslint/parser": "5.55.0",
    "@vitejs/plugin-vue": "4.1.0",
    "@vue/compiler-sfc": "3.2.47",
    "@vue/test-utils": "2.3.1",
    "babel-jest": "26.6.3",
    "eslint": "8.36.0",
    "eslint-config-airbnb-base": "15.0.0",
    "eslint-config-airbnb-typescript": "17.0.0",
    "eslint-plugin-import": "2.27.5",
    "eslint-plugin-vue": "9.9.0",
    "jest": "26.6.3",
    "jest-environment-jsdom": "26.6.2",
    "jest-puppeteer": "8.0.5",
    "node": "18.15.0",
    "ts-jest": "26.5.6",
    "vite": "4.2.0",
    "vue": "3.2.47",
    "vue-jest": "5.0.0-alpha.10",
    "vue-tsc": "1.3.2"
  }
}

...resulted in this error when running npm run test:

jonathan@notebook:~/onax/v-money3$ npm run test-with-puppeteer

> v-money3@3.23.0 test-with-puppeteer
> ./node_modules/node/bin/node ./node_modules/jest/bin/jest.js --config=jest.config.js --env=puppeteer tests/env/puppeteer/

 FAIL  tests/env/puppeteer/e2e.test.js
  ● Test suite failed to run

    TypeError: Cannot read properties of undefined (reading 'testEnvironmentOptions')

      at new NodeEnvironment (node_modules/jest-environment-puppeteer/node_modules/jest-environment-node/build/index.js:86:49)
      at new PuppeteerEnvironment (node_modules/jest-environment-puppeteer/dist/index.js:223:1)

 FAIL  tests/env/puppeteer/e2e.test.ts
  ● Test suite failed to run

    TypeError: Cannot read properties of undefined (reading 'testEnvironmentOptions')

      at new NodeEnvironment (node_modules/jest-environment-puppeteer/node_modules/jest-environment-node/build/index.js:86:49)
      at new PuppeteerEnvironment (node_modules/jest-environment-puppeteer/dist/index.js:223:1)

Test Suites: 2 failed, 2 total
Tests:       0 total
Snapshots:   0 total
Time:        0.432 s
Ran all test suites matching /tests\/env\/puppeteer\//i.
jonathan@notebook:~/onax/v-money3$

When I google search for TypeError: Cannot read properties of undefined (reading 'testEnvironmentOptions') the best results seems not to work with my problem.

This issue is preventing future updates as it is preventing me to test the library with the latest versions of the development dependencies. It could be local or not. I will get back to this later because my free time is short at the moment, sorry. I'm opening this issue to keep reminding me of this impediment.

Feature https://github.com/jonathanpmartins/v-money3/issues/77 is currently in idle because of this problem.

If someone has a PR or a reply pointing out the problem, will be appreciated!

jonathanpmartins commented 1 year ago

Solved by reverting the update commit and testing the upgrades one by one.