-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
This innocent looking code
return server.run(commissions, function(commissions) {
const commissionWriter = serverRequire('./test/support/commissionWriter')(this.tropicsDb);
return commissionWriter.addNew(...commissions);
})Fails with a seemingly unrelated error message:
ReferenceError: _toConsumableArray is not defined
at Object.eval (eval at run (/Users/artem/projects/booking-services/node_modules/karma-server-side/index.js:61:12), <anonymous>:5:62)
The problem is that by the time this code is sent to the server side for evaluation it has been transpiled into this:
var commissionWriter = serverRequire('./test/support/commissionWriter')(this.tropicsDb);
return commissionWriter.addNew.apply(commissionWriter, _toConsumableArray(commissions));Which then fails to eval since there is no such thing as _toConsumableArray defined on the server (it supports ... natively)
Metadata
Metadata
Assignees
Labels
No labels