mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-05 03:23:08 +03:00
Fix tests
This commit is contained in:
parent
7f3bdd1603
commit
a7a4a349f0
|
@ -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);
|
||||||
|
|
|
@ -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', () => {
|
||||||
|
|
|
@ -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'}
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user