Skip to content

Tests unexpectedly fail in Node 6 #5159

@m-allanson

Description

@m-allanson

Do you want to request a feature or report a bug?
This might be a bug.

What is the current behavior?
I have a small set of tests that pass on Node 8, but fail on Node 6.

The tests have a beforeEach() that resets the state of two global properties. Each test then sets the properties to different values before making assertions. in Node 6 it seems that the beforeEach reset isn't being applied.

There's a basic demo repo here: https://github.com/m-allanson/jest-global-test

Which is based on the behaviour found here: gatsbyjs/gatsby#3233

What is the expected behavior?
The tests should pass in both Node 8 and Node 6.

Jest version: 22.0.3
Yarn version: 1.3.2
Node 6 version: 6.12.2
Node 8 version: 8.9.3
OS: MacOS Sierra 10.12.6 (also observed in Travis CI's Trusty environment https://travis-ci.org/gatsbyjs/gatsby/builds/319991766)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions