Can we run Meteor.loginWithPassword in npm test Mantra


#1

I did some test on my login env and i Meteor.loginWithPassword is not giving call backs or even run in the server is there a limitation for some functions in meteor that are running only in client that cannot run in test?

heres my code

it(‘should give you an true when you log-in in a wrong credentials’,()=>{
const LocalState = {set: spy()};
const Meteor = {loginWithPassword:spy()};
let data = {
username:"admin@admin.com",
password:“admin”
}

actions.login({Meteor,LocalState},data);
const errorMessage = LocalState.set.args[0];

expect(errorMessage[0]).to.be.equal('LOGIN_STATUS');
expect(errorMessage[1]).to.be.equal(true);

});