【问题标题】:intern grunt unable to load packages which are siblings of the package being tested实习生 grunt 无法加载与正在测试的包同级的包
【发布时间】:2014-01-24 21:12:52
【问题描述】:

我在一个包中加载测试时遇到问题,该包的依赖项是被测试包的兄弟。

当前提交的杂乱代码位于https://github.com/lbod/delite/tree/intern-bforbes-setup。 这个包的兄弟依赖是 dojo 和 dcl,因此我使用加载器实习生配置将 baseUrl 设置为 '..' 即

loader: {
    baseUrl: '..',
    packages: [
        'delite',
        'dojo',
        'dcl'
    ]
}

加载 grunt test:local 任务时,tests-intern/intern.local 实习生配置将通过 grunt 加载,但 client.html 单元测试不会解析 intern.local

GET http://localhost:9000/tests-intern/intern.local.js 404 (Not Found) dojo.js:725
Uncaught Error: Failed to load module tests-intern/intern.local from /tests-intern/intern.local.js (parent: *2)

但是,如果我将客户端 html 的 URL(我能够这样做,因为测试出错并且没有关闭浏览器)更改为 http://localhost:9000/__intern/client.html?baseUrl=%2F&config=delite/tests-intern%2Fintern.local&reporters=webdriver&sessionId=48ba4743-2475-478c-b7a2-d94d661782ae,测试将成功运行

感觉就像是第 22 个问题,因为如果我将实习生 Grunt 任务配置更改为 config: 'delite/tests-intern/intern.local',该任务将不会加载 intern.local.js

这可能吗?如果可以,怎么做?

【问题讨论】:

    标签: testing dojo intern


    【解决方案1】:

    因此,对于发现此问题的其他人,它在实习生 https://github.com/theintern/intern/issues/139 中被标记为错误,正在等待标记发布

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-03-18
      • 1970-01-01
      • 2018-04-29
      • 2017-06-15
      • 2014-05-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多