how do i load modules and files in the intern config module? -
i assuming default loader dojo configs, https://github.com/theintern/intern/wiki/configuring-intern. how load other modules or files in config module? load json file , node module.
you're right -- dojo loader used load config. however, it's not standard dojo loader, may not behave same or provide same modules, , it's not technically part of intern's api. in general, it's improve provide own copies of things need rather relying on intern's dojo.
given caveat...intern's dojo include both dojo/node
, dojo/text
, can like:
define([ 'intern/dojo/node!module', 'intern/dojo/text!jsonfile' ], function (mod, data) { var config = { ... }; homecoming config; });
note: loading node module in config prevent tests running in browser. you'll able run them node.js client (intern-client
).
intern
No comments:
Post a Comment