Skip to content

Default unit tests are failing #1879

@maxpou

Description

@maxpou

Version

3.0.0-rc.5

Reproduction link

https://codesandbox.io/s/vue

Steps to reproduce

vue create vue-jest
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Router, Vuex, Linter, Unit
? Pick a linter / formatter config: Basic
? Pick additional lint features: Lint on save
? Pick a unit testing solution: Jest
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No

duplicate HelloWorld.spec.js (i.e. Users.spec.js)

What is expected?

test should pass.

What is actually happening?

 FAIL  tests/unit/Users.spec.js
  ● Test suite failed to run

    /lab/vue-jest/tests/unit/Users.spec.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import "core-js/modules/es6.array.iterator";
                                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    SyntaxError: Unexpected string

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)

In jest.config.js I added cache: false to solve the error.
Other information:

  • yarn v 1.6.0
  • node v10.1.0
  • macos High Sierra

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