Skip to content

String Comparison Incorrect #9239

Closed
Closed
@cawoodm

Description

@cawoodm

🐛 Bug Report

When comparing the string "1.234,56 CHF" to "1.234,56 CHF" (apparently identical) Jest is coming up with not equal. It boils down to JavaScript being weird in that "1.234,56 CHF" == String("1.234,56 CHF") is apparently false.

jasmineUtils.js:
image

image

image

envinfo

  System:
    OS: Windows 10 10.0.16299
    CPU: (4) x64 Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
  Binaries:
    Node: 13.2.0 - C:\prg\nodejs\node.EXE
    Yarn: 1.5.1 - C:\prg\yarn\bin\yarn.CMD
    npm: 6.13.1 - C:\prg\nodejs\npm.CMD
  npmPackages:
    jest: ^24.9.0 => 24.9.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions