Skip to content

Rest properties are broken with Jest + node v6 #3694

Closed
@vinhlh

Description

@vinhlh

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 ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions