UNPKG

node-local-auth

Version:

Framework agnostic library for secure username/email/password authentication including registration and password management

17 lines (15 loc) 326 B
'use strict'; const chai = require('chai'); const assert = chai.assert; module.exports = { assertThrows: function *(generatorFn) { let err; try { yield generatorFn(); } catch (e) { err = e; } assert.ok(err, 'Throws exception'); return err; } };