From a7a4a349f0945805638a3664e83a6d9d8911ef50 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Tue, 30 Aug 2016 20:05:21 +0300 Subject: [PATCH] Fix tests --- lib/services/schema-helper.service.ts | 2 +- lib/shared/components/StickySidebar/sticky-sidebar.spec.ts | 4 ++-- tests/unit/SpecManager.spec.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/services/schema-helper.service.ts b/lib/services/schema-helper.service.ts index 81b4e180..c812f9e7 100644 --- a/lib/services/schema-helper.service.ts +++ b/lib/services/schema-helper.service.ts @@ -97,7 +97,7 @@ const injectors = { object: { check: (propertySchema) => { return propertySchema.type === 'object' && (propertySchema.properties || - typeof propertySchema.additionalProperties === 'object') + typeof propertySchema.additionalProperties === 'object'); }, inject: (injectTo, propertySchema = injectTo) => { let baseName = propertySchema._pointer && JsonPointer.baseName(propertySchema._pointer); diff --git a/lib/shared/components/StickySidebar/sticky-sidebar.spec.ts b/lib/shared/components/StickySidebar/sticky-sidebar.spec.ts index d84d4231..14a86ecd 100644 --- a/lib/shared/components/StickySidebar/sticky-sidebar.spec.ts +++ b/lib/shared/components/StickySidebar/sticky-sidebar.spec.ts @@ -27,10 +27,10 @@ describe('Common components', () => { expect(component).not.toBeNull(); }); - it('should start unsticked', () => { + it('should start sticked', () => { spyOn(component, 'stick').and.callThrough(); fixture.detectChanges(); - expect(component.stick).not.toHaveBeenCalled(); + expect(component.stick).toHaveBeenCalled(); }); it('should stick if scrolled more than scrollYOffset', () => { diff --git a/tests/unit/SpecManager.spec.ts b/tests/unit/SpecManager.spec.ts index bcc4bd3f..6ab191f9 100644 --- a/tests/unit/SpecManager.spec.ts +++ b/tests/unit/SpecManager.spec.ts @@ -176,8 +176,8 @@ describe('Utils', () => { deriveDefs.should.be.instanceof(Array); deriveDefs.should.not.be.empty(); deriveDefs.should.be.deepEqual([ - {name: 'Cat', empty: false, $ref: '#/definitions/Cat'}, - {name: 'Dog', empty: false, $ref: '#/definitions/Dog'} + {name: 'Cat', $ref: '#/definitions/Cat'}, + {name: 'Dog', $ref: '#/definitions/Dog'} ]); });