Hello,
We are writing chai tests.
One test is expecting to throw an error.
The problem is that our code throw an error like this
throw new Meteor.error('err', 'my-error')
but in chai tests Meteor is undefined.
The only way to do it was like this :
if (typeof Meteor !== 'undefined') {
throw new Meteor.Error('err', 'my-error');
}
throw 'my-error';
It seems strange that I have to do this in my code, is it possible to import/require Meteor at the top of my function ?
Thanks