RayBenefield / dev-xp

:runner: A Monorepo of projects reaching towards EPIC proportions, maintained by one person.
MIT License
16 stars 1 forks source link

kape - snapshot diff shows incorrect difference in last line of object #1265

Open MxAshUp opened 3 years ago

MxAshUp commented 3 years ago

Hey Ray! I love using Kape. This little bug keeps bugging me though. It seems like when the diff is shown for object snapshots, the last line always incorrectly shows it as a difference. Have you seen this before?

Expected Behavior

Screenshot from 2021-04-22 15-10-38-2

Current Behavior

Screenshot from 2021-04-22 15-10-38

Context

Using node latest without es modules, using Kape 0.0.41:

const describe = require('kape').default;

const testFunction = () => {
        return {A: 1, B: 2, C:3};
}

describe('test', testFunction, snapshot =>
  snapshot([])
);

1) run this script, update snapshot 2) change A:1 to A:2 3) run script again

RayBenefield commented 3 years ago

Oh hey @DustinWoods! I totally didn't realize anyone else was using Kape 🤣🤣🤣.

I have not actually seen this before. I'm taking my afternoon off now, but I'll take a look at this in the morning and push out a patch or at least drop an update here.

MxAshUp commented 3 years ago

Haha you bet I use Kape! Thanks for looking into it.

RayBenefield commented 3 years ago

@DustinWoods so found the issue, but it revealed another issue that I'll need to put off handling until next week as I'm on a pretty tight deadline this week. Hopefully that's not too big of a problem.

Back to Lua for me 😁😁😁