Hello All,
I'm trying to configure Intern to do some unit testing on some legacy ArcGIS Javascript projects. I'm having trouble understanding the "loader" configuration in intern.js, e.g.
loaders: {
'host-node': 'bower_components/dojo/dojo',
'host-browser': 'node_modules/dojo/dojo.js'
},
I'm working off examples from SitePen, David Spriggs, and Rene's Yeoman generator, but don't seem to be able to get all the pieces to work together. My objective is pretty simple: get the SitePen tutorial working using the Esri-version of dojo provided by Bower.
I don't really understand why the "loaders" configuration is required to provide a dojo other than the default but that's done in both the Esri-related examples. In my case when I configure the loaders config as above, I get the error:
Error: Cannot find module 'bower_components/dojo/dojo'
at Function.Module._resolveFilename <module.js:339:15>
at Function.require.resolve <internal/module.js:23:19>
at <node_modules/intern/lib/executors/PreExecutor.js:437:32>
at new Promise <node_modules/intern/node_modules/dojo/Promise.ts:411:3>
at PreExecutor.swapLoader <node_modules/intern/lib/executors/PreExecutor.js:428:11>
at swapLoader <node_modules/intern/lib/executors/PreExecutor.js:389:17>
at <node_modules/intern/node_modules/dojo/Promise.ts:393:15>
at runCallbacks <node_modules/intern/node_modules/dojo/Promise.ts:11:11>
at <node_modules/intern/node_modules/dojo/Promise.ts:317:4>
at run <node_modules/intern/node_modules/dojo/Promise.ts:237:7>
There is a bower_components/dojo/dojo.js file.
Any help or clarification would be much appreciated!
--john