You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const UserModel = require('../../../src/models/user');
const Sequelize =require('sequelize');
var SequelizeMock = require('sequelize-mock');
var sequelize = new SequelizeMock();
describe('user.encryptPassword & user.comparePassword', () => {
it('should encrypt user password and compare with raw password to match', async () => {
const User = UserModel(sequelize,Sequelize.DataTypes);
const user = new User();
user.password = '123456';
await user.encryptPassword();
let matched = await user.comparePassword('123456', user.password);
expect(matched).toBe(true);
});
});
The text was updated successfully, but these errors were encountered:
what is the reason of this error?
The text was updated successfully, but these errors were encountered: