import * as assert from 'assert' ; /**
 * Same as assert.throws except for async functions
 */ export async function assertThrowsAsync < T > ( block , error , message ? ) { let blockSync = ( ) : void => { } ; try { await block ( ) ; } catch ( e ) { blockSync = ( ) : void => { throw e ; } ; } finally { assert . throws ( blockSync , error , message ) ; } }