Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Tests: Make sure that the promise in TC is resolved.
Browse files Browse the repository at this point in the history
This actually shows that this case was failing all along.
  • Loading branch information
mlewand committed Jan 3, 2020
1 parent fa6955f commit 2ef7452
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/watchdog.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ describe( 'Watchdog', () => {
);
} );

it( 'should not throw an error when the destructor is not defined', () => {
it( 'should not throw an error when the destructor is not defined', async () => {
const watchdog = new Watchdog();
watchdog.setCreator( ( el, config ) => ClassicTestEditor.create( el, config ) );

expect( () => watchdog.create() ).to.not.throw();
await watchdog.create();

return watchdog.destroy();
} );

it( 'should properly copy the config', () => {
Expand Down

0 comments on commit 2ef7452

Please sign in to comment.