Git Product home page Git Product logo

Comments (6)

LarryEitel avatar LarryEitel commented on June 1, 2024 8

FYI, I just installed vanilla install on Windows per this guide: Unit Testing Vue.js Components with the Official Vue Testing Tools and Jest.

> [email protected] test C:\_dk\_xchg\home\src\test
> jest "Phones.test.js"

[Vue warn]: Vue is a constructor and should be called with the `new` keyword
Failed to compile scr with `babel` at `vue-preprocessor`
FAIL unit\common\Phones.test.js
  ● Test suite failed to run

    TypeError: Jest: a transform's `process` function must return a string, or an object with `code` key containing this string.

      at ScriptTransformer.transformSource (node_modules/jest-runtime/build/script_transformer.js:227:15)
      at Object.<anonymous> (unit/common/Phones.test.js:2:13)

  console.info ..\..\node_modules\vue\dist\vue.common.js:8248
    You are running Vue in development mode.
    Make sure to turn on production mode when deploying for production.
    See more tips at https://vuejs.org/guide/deployment.html

This may not add any value to this issue other than to rattle someone's cage. :)

Looking forward to making this work. :)

from jest-vue-preprocessor.

rms6458 avatar rms6458 commented on June 1, 2024

I'm using webpack 2.7.0

from jest-vue-preprocessor.

rms6458 avatar rms6458 commented on June 1, 2024

Github repo:
https://github.com/rms6458/jest-vue-webpack-repo.git

from jest-vue-preprocessor.

vire avatar vire commented on June 1, 2024

I'll take a look during the weekend,

from jest-vue-preprocessor.

rms6458 avatar rms6458 commented on June 1, 2024

Did you get a chance to look into this issue?

from jest-vue-preprocessor.

vire avatar vire commented on June 1, 2024

Hey, I only checked the problem, had no chance to come with a solution, but have you considered to leverage babel config for webpack and using .babelrc ?

from jest-vue-preprocessor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.