envs icon indicating copy to clipboard operation
envs copied to clipboard

Vue component test (jest) fails online but passes locally

Open renshawdev opened this issue 5 years ago • 2 comments

Describe the bug

bit test passes locally but fails in the online component example

Steps to Reproduce

  1. export vue component
  2. go to online component
  3. see failing status with logs in console

Expected Behavior

If it tests pass locally after following instructions, they should pass online.

Screenshots, exceptions and logs

image

image

image

Specifications

  • Bit version: 14.7.4
  • Node version: 12.13.1
  • npm version: 6.12.1
  • Platform: Windows 10
  • Bit compiler (include version): [email protected]
  • Bit tester (include version): [email protected]

renshawdev avatar Feb 13 '20 00:02 renshawdev

Seems like an isolation issue. core-js is a polyfill for a variety of standard methods, like array.concat(), apparently. It's supposed to support older browser that had not implemented new features.

I think it is related to Babel, its plugin @babel/preset-env adds this polyfill (where needed). Maybe the compiler should add this as a peer dependency? Not sure why this is failing for this component and not for others.

@JoshK2 - do you have any insight about this?

KutnerUri avatar Mar 30 '20 15:03 KutnerUri

@Tallyb , If I remember correctly, you're working on a new Jest compiler. If so, please keep this issue in mind.

davidfirst avatar Apr 10 '20 16:04 davidfirst