jestjs/jest

Zero width chars not showing in diff

Open

#10.584 aperta il 4 ott 2020

Vedi su GitHub
 (12 commenti) (0 reazioni) (0 assegnatari)TypeScript (6653 fork)batch import
:rocket: Feature RequestHelp WantedPinned

Metriche repository

Star
 (45.361 star)
Metriche merge PR
 (Merge medio 11g 22h) (11 PR mergiate in 30 g)

Descrizione

🐛 Bug Report

Differences in strings containing zero width chars are not highlighted, making them incredibly hard to spot and debug. Eg, one of the following strings has as its first character (character at position 0) a byte order mark character as its first character, and the other has the letter "T" as its first character.

image

Additional useful info

To Reproduce

Just create two strings that look identical, one of which contains a character such as the BOM character.

Expected behavior

A clear indication of the difference.

envinfo

  System:
    OS: Linux 5.4 Ubuntu 18.04.5 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  Binaries:
    Node: 14.4.0 - ~/.nvm/versions/node/v14.4.0/bin/node
    Yarn: 1.21.1 - /usr/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v14.4.0/bin/npm
  npmPackages:
    jest: ^26.0.1 => 26.0.1 

Guida contributor