intelie / immutable-js-diff

MIT License
260 stars 32 forks source link

Should diff always be empty when Immutable.is returns true #10

Closed des-des closed 8 years ago

des-des commented 8 years ago

I am having trouble tracking down the cause of a diff. Two immutable objects return true when passed into Immutable.is while diff return a total replace of the object in question. Should this behaviour be possible?

juanplopes commented 8 years ago

Could you please provide a simple test case that reproduces the issue?

des-des commented 8 years ago

Here is the test

import { Set } from 'immutable';
import assert from 'assert';
import diff from 'immutable-diff';

const setDiff = diff(Set(['1']), Set(['1']));
assert.equal(setDiff.size, 0, 'there should not be a diff');
des-des commented 8 years ago

@juanplopes this seems like a bug.

brenoferreira commented 8 years ago

@pedroteixeira could you publish v0.4.3 to NPM? It fixes this issue