So I’m setting up some tests for a package. I have a file for server tests, a file for client tests and a file from which I export common things that I need on both such as a collection.
My package.js onTest
block has one mainModule
call for each file and those files in turn import from the common file.
import { ThingsCollection } from './common'
Upon running the the tests I get the following error:
W20160620-13:58:43.073(-4)? (STDERR) /tmp/meteor-test-run1ue2gng/.meteor/local/build/programs/server/packages/local-test_socialize_likeable.js:46
W20160620-13:58:43.075(-4)? (STDERR) import { Mongo } from ‘meteor/mongo’;
W20160620-13:58:43.076(-4)? (STDERR) ^^^^^^
W20160620-13:58:43.077(-4)? (STDERR) SyntaxError: Unexpected reserved word
W20160620-13:58:43.078(-4)? (STDERR) at /tmp/meteor-test-run1ue2gng/.meteor/local/build/programs/server/boot.js:292:30
W20160620-13:58:43.079(-4)? (STDERR) at Array.forEach (native)
W20160620-13:58:43.079(-4)? (STDERR) at Function..each..forEach (/home/copleykj/.meteor/packages/meteor-tool/.1.3.3_1.ywulhk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160620-13:58:43.079(-4)? (STDERR) at /tmp/meteor-test-run1ue2gng/.meteor/local/build/programs/server/boot.js:133:5
In the client I get a similar error which upon investigating in developer tools shows that the import statement is still in the source and no compiled properly to require statements.
Is this me doing something in an unintended way, or is this a bug as I suspect and should have an issue filed on github?