🎨 Fix JB errors by JSDoc

dev
KaKi87 2 years ago
parent 2f9393e79c
commit 5de713f6b1

@ -443,6 +443,7 @@ const getControllers = (stream, end) => {
const account = require('../account');
(async () => {
try {
/** @type Account */
const user = await account.login(username, password);
if(user.isOtpLocked()){
views.loginOtp(false, ({ code, codeError }) => {
@ -466,6 +467,7 @@ const getControllers = (stream, end) => {
catch(_){
return end();
}
/** @type Account */
const user = await account.register(username, password);
views.register({ username }, async ({ repeatPassword, passwordMismatchError, enableOtp }) => {
if(repeatPassword !== password) return passwordMismatchError();

@ -197,6 +197,7 @@ describe('account', () => {
it('should have changed password', () => expect(account.login('username2', password2)).to.be.fulfilled);
after('reset username & password', async () => {
/** @type Account */
const _account = await account.login('username2', password2);
await _account.setUsername(password2, 'username');
await _account.setPassword(password2, password);

Loading…
Cancel
Save