fix(test_lib): support deep compare of objects with private/static fields
This commit is contained in:

committed by
Misko Hevery

parent
674848648a
commit
e163eb2a51
@ -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'}]);
|
||||
});
|
||||
|
Reference in New Issue
Block a user