Skip to content

localStorage expected numbers returning strings in [email protected] update #6795

Closed
@anselmbradford

Description

@anselmbradford

💥 Regression Report

I work on a project that simulates an object store with this module. The global localStorage is set to this simulated version here. The test checks for a number being set in the store. In 23.4.1 this works. In 23.4.2 I get the error Expected number but received string., and the returned value is "1" and not 1.

Possibly related to the update to resolve jsdom/jsdom#2304

Last working version

Worked up to version: 23.4.1

Stopped working in version: 23.4.2

To Reproduce

Hmm… well you could try https://github.com/cfpb/cfgov-refresh#quickstart, update jest in package.json, and run gulp test:unit

Expected behavior

Data types should not change.

Link to repl or repo (highly encouraged)

See Regression Report.

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: macOS Sierra 10.12.6
    CPU: x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  Binaries:
    Node: 8.11.1 - ~/.nvm/versions/node/v8.11.1/bin/node
    Yarn: 1.7.0 - ~/homebrew/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v8.11.1/bin/npm
  npmPackages:
    jest: 23.4.2 => 23.4.2

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