question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tests fails immediately after bootstrap

See original GitHub issue

Version

3.0.1

Reproduction link

https://github.com/pomle/vue-test-fail-bug

Node and OS info

Node 10.2.1, Yarn 1.7.0

Steps to reproduce

  1. Run vue create [app].
  2. Run yarn run test:unit

Full cli output presented below.

➜ Development vue create amuse-alfre6

Vue CLI v3.0.1 ? Please pick a preset: Manually select features ? Check the features needed for your project: Babel, TS, Router, CSS Pre-processors, Linter, Unit, E2E ? Use class-style component syntax? Yes ? Use Babel alongside TypeScript for auto-detected polyfills? Yes ? Use history mode for router? (Requires proper server setup for index fallback in production) Yes ? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): SCSS/SASS ? Pick a linter / formatter config: TSLint ? Pick additional lint features: Lint on save ? Pick a unit testing solution: Jest ? Pick a E2E testing solution: Cypress ? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In package.json ? Save this as a preset for future projects? Yes ? Save preset as: pontus-first-vue-test

Vue CLI v3.0.1 ✨ Creating project in /Users/pom/Development/amuse-alfre6. 🗃 Initializing git repository… ⚙ Installing CLI plugins. This might take a while…

yarn install v1.7.0 info No lockfile found. [1/4] 🔍 Resolving packages… ⠁ (node:78925) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. [2/4] 🚚 Fetching packages… [3/4] 🔗 Linking dependencies… [4/4] 📃 Building fresh packages… success Saved lockfile. ✨ Done in 164.43s. 🚀 Invoking generators… 📦 Installing additional dependencies…

yarn install v1.7.0 [1/4] 🔍 Resolving packages… ⠁ (node:78974) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. [2/4] 🚚 Fetching packages… [3/4] 🔗 Linking dependencies… [4/4] 📃 Building fresh packages… success Saved lockfile. ✨ Done in 25.88s. ⚓ Running completion hooks…

📄 Generating README.md…

🎉 Successfully created project amuse-alfre6. 👉 Get started with the following commands:

$ cd amuse-alfre6 $ yarn serve

➜ Development cd amuse-alfre6 ➜ amuse-alfre6 git:(master) yarn run test:unit yarn run v1.7.0 $ vue-cli-service test:unit FAIL tests/unit/HelloWorld.spec.ts ● Test suite failed to run

/Users/pom/Development/amuse-alfre6/tests/unit/HelloWorld.spec.ts:3
import "core-js/modules/es6.array.iterator";
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected string

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

Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 1.4s Ran all test suites. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What is expected?

Test should succeed.

What is actually happening?

Tests fail.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
AlexandreBonaventurecommented, Aug 27, 2018

Don’t know if it’s related but with the new cypress 3.1.0 I get this error 'import' and 'export' may appear only with 'sourceType: module' inside the cypress UI. Works again when I downgrade the resolution to be @3.0.3

3reactions
Kocalcommented, Sep 2, 2018

Got the same issue when running Jest on TypeScript tests (importing TypeScripts files). Running jest with --no-cache seems to works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selenium - after bootstrap modal test, subsequent test fail with ...
This error message. ... As you mentioned test which launch a modal and close it, will pass, ... Hence the click on the...
Read more >
ELK Services fails bootstrap test during startup after server ...
This leads to the failure of ELK Services since Elasticsearch checks system limits during a bootstrap test it runs on startup.
Read more >
Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >
Karma tests with modal problem - Material Design for Bootstrap
I'm have unit test that is simply testing that a component is created. ... Failed: Template parse errors: There is no directive with...
Read more >
Error in bootstrap test - RStudio Community
library(lmeresampler) L3_mdlBS <- bootstrap(L3_mdl1, .f=fixef, ... tried to change it just to FALSE, TRUE and it comes up with this error:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found