concordancejs / concordance

Compare, format, diff and serialize any JavaScript value

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

String diffs don't invert properly

novemberborn opened this issue · comments

Issuehunt badges

In AVA, when diffing snapshots the gutters are inverted. This doesn't invert the string diff colors though. Compare the output for these tests:

import test from 'ava'

test('snapshot diff', t => {
  t.snapshot(`\n${Date.now()}\n`, 'the - value should be less than the + value')
})

test('direct diff', t => {
  t.is(`\n${Date.now() - 42e5}\n`, `\n${Date.now()}\n`)
})

screen shot 2017-10-23 at 15 48 57

I realized this previously but hadn't yet filed the issue. Example via avajs/ava#1558.


IssueHunt Summary

ninevra ninevra has been rewarded.

Backers (Total: $40.00)

Submitted pull Requests


Tips

@IssueHunt has funded $40.00 to this issue.


@novemberborn has rewarded $36.00 to @ninevra. See it on IssueHunt

  • 💰 Total deposit: $40.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $4.00