diff --git a/src/shared/services/json-store.service.spec.ts b/src/shared/services/json-store.service.spec.ts index d36c8859..db2370f1 100644 --- a/src/shared/services/json-store.service.spec.ts +++ b/src/shared/services/json-store.service.spec.ts @@ -291,7 +291,7 @@ describe('JsonStoreService', () => { service.rollbackLastChange(); }); - it('shoul set json patches and group them by path', () => { + it('should set json patches and group them by path', () => { const patches = [ { path: '/p/1', @@ -335,7 +335,7 @@ describe('JsonStoreService', () => { service.setJsonPatches(patches); }); - it('shoul return true for parent if a child has a patch', () => { + it('should return true for parent if a child has a patch', () => { const patches = [ { path: '/parent/children/0', @@ -351,7 +351,7 @@ describe('JsonStoreService', () => { expect(service.hasPatchOrChildrenHavePatch('/parent')).toBe(true); }); - it('shoul return true for parent if it has a patch', () => { + it('should return true for parent if it has a patch', () => { const patches = [ { path: '/parent', @@ -367,7 +367,7 @@ describe('JsonStoreService', () => { expect(service.hasPatchOrChildrenHavePatch('/parent')).toBe(true); }); - it('shoul return false for parent if it or a child does not have a patch', () => { + it('should return false for parent if it or a child does not have a patch', () => { const patches = [ { path: '/other/thing', @@ -377,4 +377,10 @@ describe('JsonStoreService', () => { service.setJsonPatches(patches); expect(service.hasPatchOrChildrenHavePatch('/parent')).toBe(false); }); + + it('should return false if patch is undefiled', () => { + const patches = undefined; + service.setJsonPatches(patches); + expect(service.hasPatchOrChildrenHavePatch('/parent')).toBe(false); + }); });