我正在尝试为我的项目(Dojo/JS 项目)设置实习生,并且服务器不是 Node... 我遇到了加载程序问题,这似乎是由于 dojo.has 使用 Dojo 加载程序... require 包装器在这里建议对我不起作用。
我收到以下错误:
> node node_modules/intern/client.js config=tests/intern
Defaulting to "console" reporter
dojo/text plugin failed to load because loader does not support getText
TypeError: undefined is not a function
at Object.load (lib/dojo/dojo/text.js:199:6)
以下是我的实习生配置和测试文件:
/tests/intern.js:(配置文件)
loader: {
packages: [ { name: 'visitorsPortal', location: 'portals/visitor' },
{ name: 'dojo', location: 'lib/dojo/dojo'},
{ name: 'dijit', location: 'lib/dojo/dijit'},
{ name: 'portalLib', location: 'portals/lib'} ]
},
suites: [ 'tests/uitests' ],
测试/测试:
define([
'intern!tdd',
'intern/chai!assert',
'portals/visitor/views/MyModule'
], function (test, assert, MyModule) {
// empty for now...
});