const app = require('vn-loopback/server/server'); describe('account setPassword()', () => { it('should throw an error when password does not meet requirements', async() => { let req = app.models.Account.setPassword(1, 'insecurePass'); await expectAsync(req).toBeRejected(); }); it('should update password when it passes requirements', async() => { let req = app.models.Account.setPassword(1, 'Very$ecurePa22.'); await expectAsync(req).toBeResolved(); }); });