Skip to content

Jest version mismatch in @vue/cli-plugin-unit-jest #3833

Closed
@LolliDepp

Description

@LolliDepp

Version

3.6.3

Environment info

 System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 10.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0-beta.3
    @vue/babel-plugin-transform-vue-jsx:  1.0.0-beta.3
    @vue/babel-preset-app:  3.6.0
    @vue/babel-preset-jsx:  1.0.0-beta.3
    @vue/babel-sugar-functional-vue:  1.0.0-beta.3
    @vue/babel-sugar-inject-h:  1.0.0-beta.3
    @vue/babel-sugar-v-model:  1.0.0-beta.3
    @vue/babel-sugar-v-on:  1.0.0-beta.3
    @vue/cli-overlay:  3.6.0
    @vue/cli-plugin-babel: ^3.6.0 => 3.6.0
    @vue/cli-plugin-typescript: ^3.6.0 => 3.6.0
    @vue/cli-plugin-unit-jest: ^3.6.3 => 3.6.3
    @vue/cli-service: ^3.6.0 => 3.6.0
    @vue/cli-shared-utils:  3.6.0
    @vue/component-compiler-utils:  2.6.0
    @vue/eslint-config-airbnb: ^4.0.0 => 4.0.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/test-utils: ^1.0.0-beta.29 => 1.0.0-beta.29
    @vue/web-component-wrapper:  1.2.0
    babel-helper-vue-jsx-merge-props:  2.0.3
    jest-serializer-vue: ^2.0.2 => 2.0.2
    vue: ^2.6.10 => 2.6.10
    vue-class-component: ^7.0.2 => 7.0.2
    vue-emoji-picker: ^1.0.1 => 1.0.1
    vue-hot-reload-api:  2.3.3
    vue-jest: ^3.0.4 => 3.0.4
    vue-loader:  15.7.0
    vue-property-decorator: ^8.1.0 => 8.1.0
    vue-router: ^3.0.2 => 3.0.6
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.1.0 => 3.1.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

Install Jest ^23.6.0
Install @vue/cli-plugin-unit-jest 3.6.3

One of the plugin's dependencies, jest-watch-typeahead, from version 0.2.2 is using Jest ^24 - and the plugin is now using ^0.3
Since the plugin requires Jest 23.6^, this causes most of the jest-related packages to be on 23.something, except some that get installed by this jest-watchtypeahead` on version 24
Go check in package-lock.json, some @jest scoped packages are on 24

What is expected?

If I'm using Jest ^23, the whole environment runs on Jest ^23

What is actually happening?

Some packages run on Jest ^24 dependencies, causing various sort of side effects


No need to reproduce, just go look at the dependencies of the packages I mention, they don't match!

This caused some side effects where most of my tests where failing, but was fixed by downgrading

Faulty package on 0.2.1 (correct Jest version) https://github.com/jest-community/jest-watch-typeahead/blob/e63c2f3538061966a87bf3594aac25e47ef397d6/package.json

Faulty package on 0.2.2 (Jest mismatch) https://github.com/jest-community/jest-watch-typeahead/blob/8766546bb3fb26242b49117fb6c9e3f66452b79d/package.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions