我目前正在考虑将实习生集成到更大的技术堆栈中,但似乎陷入了困境。 大多数情况下,我关注了this article on how to test TypeScript with Intern .
我使用 Nodejs 和 Angular 以及 TypeScript 进行开发,并将其转换为 ES5。模块格式是systemjs(不幸的是,这是这个环境中必须具备的)。
实习生文档中提到了测试其他模块类型,但如果可能的话,我不确定如何使其适应我的需求。
如果我尝试通过手动 require($module)
绕过 systemjs,实习生会不断通知我缺少所需的模块(模块的依赖项)。
我当前的 tsconfig-options:
"compilerOptions": {
"module": "System",
"target": "ES5",
"sourceMap": true,
"noEmitOnError": false,
"outDir": "src/scripts/js"
}
尽管我像官方 Angular 示例测试中那样添加了 Angular 模块,但我几乎没有修改实习生的示例配置。 任何提示或帮助将不胜感激
最佳答案
看看 loaders configuration 。它展示了如何使用 RequireJS 而不是 Dojo 加载器。如果 SystemJS 提供相同的 API (AMD),您也应该能够将其替换。
关于angularjs - 将 intern 与 systemjs 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35128057/