fix(test_lib): support comparing Maps in nested structures

This commit is contained in:
Tobias Bosch
2015-01-27 14:52:15 -08:00
parent af41fa9ac4
commit ec935565ca
2 changed files with 40 additions and 32 deletions
+6 -1
View File
@@ -26,9 +26,14 @@ export function main() {
expect(falseActual).not.toEqual(expected);
});
it('should work for arrays of maps', () => {
it('should work for arrays of string maps', () => {
expect([{'a':'b'}]).toEqual([{'a':'b'}]);
});
it('should work for arrays of real maps', () => {
expect([MapWrapper.createFromStringMap({'a':'b'})]).toEqual([MapWrapper.createFromStringMap({'a':'b'})]);
expect([MapWrapper.createFromStringMap({'a':'b'})]).not.toEqual([MapWrapper.createFromStringMap({'a':'c'})]);
});
});
describe('toEqual for Maps', () => {