Skip to content

Use diffWordsWithSpace instead of diffWords in the console reporter #1055

@icetbr

Description

@icetbr

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 diffWords is not ignoring white space kpdecker/jsdiff#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportQuestions, discussions, and general support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions