fix(test_lib): support deep compare of objects with private/static fields

This commit is contained in:
Tobias Bosch
2015-02-17 14:30:08 -08:00
committed by Misko Hevery
parent 674848648a
commit e163eb2a51
2 changed files with 73 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import {describe, it, iit, ddescribe, expect, tick, async, SpyObject, beforeEach, proxy} from 'angular2/test_lib';
import {MapWrapper, ListWrapper} from 'angular2/src/facade/collection';
import {PromiseWrapper} from 'angular2/src/facade/async';
import {IMPLEMENTS} from 'angular2/src/facade/lang';
import {IMPLEMENTS, Date, DateWrapper} from 'angular2/src/facade/lang';
class TestObj {
prop;
@ -26,6 +26,10 @@ export function main() {
expect(falseActual).not.toEqual(expected);
});
it('should structurally compare objects with private and static fields', () => {
expect(DateWrapper.fromMillis(1)).toEqual(DateWrapper.fromMillis(1));
});
it('should work for arrays of string maps', () => {
expect([{'a':'b'}]).toEqual([{'a':'b'}]);
});