// package.js
Package.onTest(function(api) {
api.use([
'tinytest',
'mongo',
'my-package']);
// Using A, B, *or* C below -- no luck running my test on the server
// A
api.addFiles('my-package-tests.js');
// B
api.addFiles('my-package-tests.js', ['client', 'server']);
// C
api.mainModule('my-package-tests.js', 'client')
api.mainModule('my-package-tests.js', 'server')
});
// my-package-tests.js
if (Meteor.isServer) console.log('SERVER')
else if (Meteor.isClient) console.log('CLIENT')
Tinytest.add("simple", function (test) {
test.equal(1, 1);
})
I’m running using
meteor test-packages ./packages/my-package --port 25111 --release 3.0.4
The simple
test runs on the client, in a browser, but on the server, no tests are run. SERVER
does indeed print, but again, no tests run.
Do I need to adjust my command or package.js
? What gives?
Thanks!