Skip to content

Typescript project runs with a type error in serve mode (lack of shallow funciton) #1309

@anton-tarasov-qs

Description

@anton-tarasov-qs

Version

3.0.0-beta.10

Reproduction link

https://www.dropbox.com/s/t15zyqygx17aett/chrome_2018-05-16_20-47-21.png

Steps to reproduce

  1. install vue-cli 3.0.0-beta.10
  2. create a Typescript project with Jest unit-tests
  3. npm run serve

What is expected?

Development server runs without errors

What is actually happening?

It shows an error:

ERROR in .../tests/unit/HelloWorld.spec.ts
1:10 Module '".../node_modules/@vue/test-utils/types/index"' has no exported member 'shallow'.
import { shallow } from '@vue/test-utils';

shallow function was renamed to shallowMount in @vue/test-utils types file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions