Fix tests

This commit is contained in:
Roman Hotsiy 2016-08-30 20:05:21 +03:00
parent 7f3bdd1603
commit a7a4a349f0
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
3 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ const injectors = {
object: { object: {
check: (propertySchema) => { check: (propertySchema) => {
return propertySchema.type === 'object' && (propertySchema.properties || return propertySchema.type === 'object' && (propertySchema.properties ||
typeof propertySchema.additionalProperties === 'object') typeof propertySchema.additionalProperties === 'object');
}, },
inject: (injectTo, propertySchema = injectTo) => { inject: (injectTo, propertySchema = injectTo) => {
let baseName = propertySchema._pointer && JsonPointer.baseName(propertySchema._pointer); let baseName = propertySchema._pointer && JsonPointer.baseName(propertySchema._pointer);

View File

@ -27,10 +27,10 @@ describe('Common components', () => {
expect(component).not.toBeNull(); expect(component).not.toBeNull();
}); });
it('should start unsticked', () => { it('should start sticked', () => {
spyOn(component, 'stick').and.callThrough(); spyOn(component, 'stick').and.callThrough();
fixture.detectChanges(); fixture.detectChanges();
expect(component.stick).not.toHaveBeenCalled(); expect(component.stick).toHaveBeenCalled();
}); });
it('should stick if scrolled more than scrollYOffset', () => { it('should stick if scrolled more than scrollYOffset', () => {

View File

@ -176,8 +176,8 @@ describe('Utils', () => {
deriveDefs.should.be.instanceof(Array); deriveDefs.should.be.instanceof(Array);
deriveDefs.should.not.be.empty(); deriveDefs.should.not.be.empty();
deriveDefs.should.be.deepEqual([ deriveDefs.should.be.deepEqual([
{name: 'Cat', empty: false, $ref: '#/definitions/Cat'}, {name: 'Cat', $ref: '#/definitions/Cat'},
{name: 'Dog', empty: false, $ref: '#/definitions/Dog'} {name: 'Dog', $ref: '#/definitions/Dog'}
]); ]);
}); });