Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Commit

Permalink
Use conventional test syntax instead of magic "resolves"
Browse files Browse the repository at this point in the history
Since there was another assertion in the test, and it did not actively
wait for the promise to be resolved, the test passed without evaluating
the second assertion.
  • Loading branch information
jakobw authored and wiese committed Dec 20, 2018
1 parent c4451fd commit e543710
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unit/client/init.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ describe( 'client/init', () => {
const termboxRequestPromise = init();

expect( termboxRequestPromise ).toBeInstanceOf( Promise );
expect( termboxRequestPromise ).resolves.toBeInstanceOf( TermboxRequest );
return termboxRequestPromise.then( ( request ) => {
expect( request ).toBeInstanceOf( TermboxRequest );
} );
} );

it( 'generates a TermboxRequest from the mw environment', () => {
Expand Down

0 comments on commit e543710

Please sign in to comment.