Giter VIP home page Giter VIP logo

jest-babel-issue's Introduction

Test babel error

To reproduce in Docker

# Install Dependencies
docker run -t -v $(pwd):/app -w /app node:6.10.0 sh -c "rm -Rf node_modules/ && yarn install"

# Run react-scripts test
docker run -t -v $(pwd):/app -w /app node:6.10.0 sh -c "./node_modules/.bin/react-scripts test --env=jsdom"

# Run Jest directly
docker run -t -v $(pwd):/app -w /app node:6.10.0 sh -c "./node_modules/.bin/jest"

# Get shell access
docker run -ti -v $(pwd):/app -w /app node:6.10.0 bash

Running ./node_modules/.bin/react-scripts test --env=jsdom

 FAIL  src/App.test.js
  ● Test suite failed to run

    TypeError: Cannot read property 'bind' of undefined

      at Runtime._createRuntimeFor (node_modules/jest-runtime/build/index.js:640:37)
      at process._tickCallback (internal/process/next_tick.js:103:7)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        2.157s
Ran all test suites.

Watch Usage
 › Press o to only run tests related to changed files.
 › Press p to filter by a filename regex pattern.
 › Press t to filter by a test name regex pattern.
 › Press q to quit watch mode.
 › Press Enter to trigger a test run.

Running ./node_modules/.bin/jest

 FAIL  src/App.test.js
  ● Test suite failed to run

    /app/src/App.js: Unexpected token (7:11)
         5 | export const test = (string) => {
         6 |   const base = { base: true, value: string };
      >  7 |   return { ...base, extends: true };
           |            ^
         8 | }
         9 |
        10 | class App extends Component {

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        6.144s
Ran all test suites.

jest-babel-issue's People

Contributors

gaearon avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.