chore: fix tests

This commit is contained in:
Roman Hotsiy 2017-04-19 12:41:15 +03:00
parent 7e36a9ba12
commit c41f56d33c
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
3 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,7 @@
import { SpecManager } from '../utils/spec-manager'; import { SpecManager } from '../utils/spec-manager';
import { BaseComponent } from '../components/base'; import { BaseComponent } from '../components/base';
import { OptionsService } from '../services/options.service';
describe('Redoc components', () => { describe('Redoc components', () => {
describe('BaseComponent', () => { describe('BaseComponent', () => {
@ -9,7 +10,7 @@ describe('Redoc components', () => {
let component; let component;
beforeAll(() => { beforeAll(() => {
specMgr = new SpecManager(); specMgr = new SpecManager(new OptionsService());
specMgr._schema = {tags: []}; specMgr._schema = {tags: []};
}); });

View File

@ -1,9 +1,11 @@
'use strict'; 'use strict';
import { SchemaNormalizer } from './schema-normalizer.service'; import { SchemaNormalizer } from './schema-normalizer.service';
import { SpecManager } from '../utils/spec-manager';; import { SpecManager } from '../utils/spec-manager';;
import { OptionsService } from '../services/options.service';
describe('Spec Helper', () => { describe('Spec Helper', () => {
let specMgr:SpecManager = new SpecManager(); let specMgr:SpecManager = new SpecManager(new OptionsService());
let normalizer = new SchemaNormalizer(specMgr); let normalizer = new SchemaNormalizer(specMgr);
describe('Dereference', () => { describe('Dereference', () => {

View File

@ -1,6 +1,7 @@
'use strict'; 'use strict';
import { SpecManager } from '../../lib/utils/spec-manager'; import { SpecManager } from '../../lib/utils/spec-manager';
import { OptionsService } from '../../lib/services/options.service';
import * as xExtendedDefs from './x-extended-defs.json'; import * as xExtendedDefs from './x-extended-defs.json';
describe('Utils', () => { describe('Utils', () => {
@ -8,7 +9,7 @@ describe('Utils', () => {
let specMgr: SpecManager; let specMgr: SpecManager;
beforeEach(() => { beforeEach(() => {
specMgr = new SpecManager(); specMgr = new SpecManager(new OptionsService());
}); });
it('load should return a promise', ()=> { it('load should return a promise', ()=> {