Im working on a project built in Meteor + angular1 .
We are using Mocha for writing unit test-cases
.Iam unable to call a serverside method from my testjs file.I have my test file in imports folder.
my server-side method:
Meteor.methods({
testcall:function() {
console.log(‘hello there’);
return “luck”;
}
});
my test-case:
describe(‘testcall’, function () {
it(‘shuold call testcall method’, function () {
Meteor.methods.call(‘testcall’, function(error, result) {
console.log(error || result);
});
});
});
ERROR:
"Method testcall not found’’.
Any ideas?
Thanks