Skip to content

Instantly share code, notes, and snippets.

@joakin
Created May 7, 2018 16:22
Show Gist options
  • Save joakin/7e20b3fa243f66d68f69fb695fc04a9f to your computer and use it in GitHub Desktop.
Save joakin/7e20b3fa243f66d68f69fb695fc04a9f to your computer and use it in GitHub Desktop.
QUnit test with promise
QUnit.test( 'checking bad reference', function ( assert ) {
assert.expect(1);
return this.referencesGateway.getReference( '#cite_note-bad', this.page ).catch( function ( err ) {
assert.ok( err === ReferencesGateway.ERROR_NOT_EXIST, 'When bad id given false returned.' );
return null;
} );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment