fix(KeyValueDiffer): check for changes

fixes #9115
This commit is contained in:
Victor Berchet
2016-07-15 16:26:54 -07:00
parent 0914dc35e8
commit 3f08efa35d
3 changed files with 48 additions and 11 deletions

View File

@ -189,11 +189,8 @@ export function main() {
});
it('should work regardless key order', () => {
let m: {[k: string]: number} = {a: 0, b: 0};
differ.check(m);
m = {b: 1, a: 1};
differ.check(m);
differ.check({a: 0, b: 0});
differ.check({b: 1, a: 1});
expect(differ.toString()).toEqual(kvChangesAsString({
map: ['b[0->1]', 'a[0->1]'],