For my project, I am trying to set up Mocha to run Chai tests, but am having an issue where the tests are simply not running at all. The browser reports that no tests are passing, failing, or running.
Here is the code for the tests:
import {assert} from 'chai';
import {Meteor} from 'meteor/meteor';
if (Meteor.isclient) {
describe('Recipe model', function () {
it('should test that a recipe is created', function () {
assert.isTrue(true);
});
});
}
I run the test using the following command:
meteor test --driver-package practicalmeteor:mocha
I have installed practicalmeteor:chai as well. A google search suggested putting chai.should() at the beginning of my test, but that did not help. I am open to all suggestions.
Cheers!
One of possible issues is typo at 4th line of your code: replace Meteor.isclient
with Meteor.isClient
. Your test even didn't executed because Meteor.isclient
was always false
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With