Closed art-in closed 9 years ago
Did you add api.use('universe:modules');
in your Package.onTest
? Or other equivalent that velocity is using?
I'm not familiar with velocity tests and haven't used them with modules yet, but "reserver word" error will happen if file is not parsed by modules, and this could happen in case of missing dependency.
Using System.import
in plain js test file is a valid use case and it can be even easier to write async tests with this syntax. Of course to load a module it need to be parsed by build plugin first anyway.
@MacRusher I'm not familiar with api.use('universe:modules')
and Package.onTest
yet.
Going to investigate this later and post back. Thanks.
Looks like this will be addressed by https://github.com/meteor-velocity/velocity/issues/356
In my app all files are universe:modules. Is there any way to reference them from Velocity tests with
import
?I've tried to create test file with
.import.js
extension andimport
inside to reference my source module, but looks like this test file is not handled as module since I got"reserved word"
-error on it.Is my only option is
System.import('myModule').then(function(module) {})
?