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.

Vscode extension fails (Unexpected token)

See original GitHub issue

The Vscode extension fails to run the the tests, output

FAIL  src/App.test.js

  ● Test suite failed to run

    /Users/pkearney/Development/react-app/src/App.test.js: Unexpected token (6:10)
        4 | 
        5 | it('renders without crashing', () => {
      > 6 |   shallow(<App />);
          |           ^
        7 | });
        8 | 

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

The tests run normally on the command line with npm test

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
aleccool213commented, May 23, 2018

Sorry, should have linked that I had the same problem as this comment.

If that’s you problem, change pathToJest to npm test – and call it a day.

This solution works! Thank you!

2reactions
ryan-marscommented, Mar 5, 2017

That’s bizarre. Still broken for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with unexpected token with many exstensions vscode
I I can't install many extensions because I have a problem like this: "Unexpexted token". mainThreadExtensionService.ts:95. Activating extension ...
Read more >
in my VS Code, but --Uncaught SyntaxError: Unexpected ...
This will fix your "Unexpected token 'return'" error. Share.
Read more >
Syntax error, unexpected token "isset", expecting "(" PHP in ...
Syntax error, unexpected token "isset", expecting "(" PHP in Visual ... Visual Studio Code 2022 | Web Dev Setup | Top Extensions, Themes, ......
Read more >
Unexpected Token Error in VS Code
I'm trying to set up VS Code for ObjectScript using the instructions found here. I've got both Cache 2018.1.2.309.0 and IRIS 2020.1.0.215.0.
Read more >
Enums marked as a problem "Syntax error: unexpected token"
Issue is with the VSCode extension detecting the PHP runtime version properly (maybe running php -v once to detect this then analyse the ......
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