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.

Rest properties are broken with Jest + node v6

See original GitHub issue

Is this a bug report?

Might be

Environment

  • node v6.12.3
  • react-scripts v1.0.17

Steps to Reproduce

Add this test

it('run without crashing', () => {
  const arrayOfObjects = [{ awesome: true }]
  const [{ awesome, ...rest}] = arrayOfObjects

  expect(true).toBe(true)
});

Expected Behavior

No error

Actual Behavior

      const [{ awesome, ...rest }] = arrayOfObjects;
                        ^^^

    SyntaxError: Unexpected token ...

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
gaearoncommented, Jan 15, 2018

This is out in react-scripts@1.1.0! Please let us know if something doesn’t quite work. https://github.com/facebookincubator/create-react-app/releases/tag/v1.1.0

0reactions
gaearoncommented, Jan 14, 2018

No problem, thanks for trying!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest did not exit one second after the test run has completed.
Jest did not exit one second after the test run has completed. This usually means that there are asynchronous operations that weren't stopped...
Read more >
Test runner with Nodejs and Jest not working with 17.1
First, the framework adapter sets the testMatch config option to an array with a single value which is the full path to the...
Read more >
node-fetch 3.0.0 and jest gives SyntaxError - Stack Overflow
My unit tests have started breaking from this change. I was using jest.requireActual("node-fetch") for the Response object
Read more >
Globals - Jest
Runs a function after all the tests in this file have completed. If the function returns a promise or is a generator, Jest...
Read more >
Jest Testing like a Pro - Tips and tricks
A (long) summary of best practices and tips to test your code with Jest. Tagged with unittesting, javascript, bestpractices, node.
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