Skip to content

Commit

Permalink
Tests fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekbogdanski committed Dec 14, 2020
1 parent 3fad8de commit 5d254c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ckeditor/ckeditor.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ describe( 'CKEditor namespace', () => {
let fixtures = [];

beforeEach( () => {
if ( window[ 'CKEDITOR' ] ) {
delete window[ 'CKEDITOR' ];
}

return TestBed.configureTestingModule( {
declarations: [ CKEditorComponent ]
} ).compileComponents();
Expand Down Expand Up @@ -56,8 +60,6 @@ describe( 'CKEditor namespace', () => {
it( 'should be loaded and trigger namespaceLoaded event only once', () => {
const spy = jasmine.createSpy();

delete window[ 'CKEDITOR' ];

return Promise.resolve(
createComponent( spy )
).then ( () => {
Expand All @@ -78,8 +80,6 @@ describe( 'CKEditor namespace', () => {

const expectedLang = 'fr';

delete window[ 'CKEDITOR' ];

return createComponent( changeLang( expectedLang ) ).then( ( component1: CKEditorComponent ) => {
expect( component1.instance.config.language ).toEqual( expectedLang );
return createComponent( changeLang( 'en' ) );
Expand Down

0 comments on commit 5d254c8

Please sign in to comment.