Open ksendra opened 7 years ago
Running into this issue as well, wonder why sendTemplate
is now part of the Mandrill
object.
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?