lab icon indicating copy to clipboard operation
lab copied to clipboard

Use diffWordsWithSpace instead of diffWords in the console reporter

Open icetbr opened this issue 1 year ago • 0 comments

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): yes

Context

  • node version: 16.7.0
  • module version with issue: 24.3.2
  • last module version without issue: none
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): hapi
  • any other relevant information: I think it's due to a bug https://github.com/kpdecker/jsdiff/issues/236

What are you trying to achieve or the steps to reproduce?

I believe it would be more helpful if white space were to be colored to indicate changes. This is even more problematic when a non break space is in the place of a regular space, so that you can't even see "two spaces" vs "one space"

    test.only('default', async (done) => {
        expect('word1 word2 word3').to.equal('word1  word2 word4')
    });

What was the result you got?

image

What result did you expect?

image

icetbr avatar Jul 20 '22 15:07 icetbr