Skip to content

Libraries that use Symbol properties on builtin prototypes break in Jest #4603

Closed as not planned

Description

Do you want to request a feature or report a bug?
bug

What is the current behavior?

Libraries that add Symbols to builtins like Object.prototype and Array.prototype for unique, anonymous properties break using Jest.

If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.

demonstration of the problem

What is the expected behavior?

Symbol properties can be added to builtin prototypes. This works IRL in node, browser, and other testing frameworks.

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

$ node --version
v8.5.0
$ yarn test --version                                                                   ⏎
yarn test v1.0.2
$ jest "--version"
v21.2.1
✨  Done in 0.26s.
$ uname -a
Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions