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
Hi, I'm trying to run meteor tests to test some of functionality that uses Your Mandrill package - and it seems that the package does not load correctly in test mode. I'm using practicalmeteor:mocha for tests.
Mandrill.messages.sendTemplate usage returns 'Cannot read property 'sendTemplate' of undefined' and the console.log of Mandrill returns { options: {}, config: [Function], sendTemplate: [Function] } while in non-test mode it's much larger.
Any suggestions on how to get this working?
The text was updated successfully, but these errors were encountered:
In case anyone is wondering, you need to explicitly call Mandrill.config({ ...yourOptions }) before your tests, as meteor won't load the file where you are doing this for the non-test app.
So simply import it in a place that gets run before your tests start. This would be a working hack:
Mandrill.config({});describe('my email tests',()=>{it('works',()=>{// Your tests})})
Hi, I'm trying to run meteor tests to test some of functionality that uses Your Mandrill package - and it seems that the package does not load correctly in test mode. I'm using practicalmeteor:mocha for tests.
Mandrill.messages.sendTemplate usage returns 'Cannot read property 'sendTemplate' of undefined' and the console.log of Mandrill returns { options: {}, config: [Function], sendTemplate: [Function] } while in non-test mode it's much larger.
Any suggestions on how to get this working?
The text was updated successfully, but these errors were encountered: