I do not understand this error. Why can't I use import
?
import { chai } from 'meteor/practicalmeteor:chai';
^^^^^^
SyntaxError: Unexpected reserved word
package.js
Package.onTest(function(api) {
api.use('practicalmeteor:mocha');
api.addFiles('tests/test.js');
});
test.js
import { chai } from 'meteor/practicalmeteor:chai';
describe('Array', function() {
describe('#indexOf()', function () {
it('should return -1 when the value is not present', function () {
chai.assert.equal(-1, [1,2,3].indexOf(5));
chai.assert.equal(-1, [1,2,3].indexOf(0));
});
});
});
Aucun commentaire:
Enregistrer un commentaire