Javascript 如何在Intern 2功能测试中加载pollUntil帮助程序

Javascript 如何在Intern 2功能测试中加载pollUntil帮助程序,javascript,testing,functional-testing,intern,Javascript,Testing,Functional Testing,Intern,intern 2文档给出了加载后在测试页面上等待条件为真的以下示例: this.remote .get(require.toUrl('./SomeTest.html')) .then(pollUntil('return window.ready;', 5000)); 不幸的是,它没有解释如何加载pollUntil帮助程序以便在前面的示例中使用它。。。有没有人有一个完整的使用PollTill的工作示例 谢谢你的帮助。我想我找到了答案:它通过加载模块intern/dojo/node

intern 2文档给出了加载后在测试页面上等待条件为真的以下示例:

this.remote
    .get(require.toUrl('./SomeTest.html'))
    .then(pollUntil('return window.ready;', 5000));
不幸的是,它没有解释如何加载pollUntil帮助程序以便在前面的示例中使用它。。。有没有人有一个完整的使用PollTill的工作示例


谢谢你的帮助。

我想我找到了答案:它通过加载模块
intern/dojo/node工作!leadfoot/helpers/pollUntil
,如中所示:

define([
    'intern!object',
    'intern/chai!assert',
    'intern/dojo/node!leadfoot/helpers/pollUntil',
    '../Request',
    'require'
 ], function (registerSuite, assert, pollUntil, Request, require) {
实习4用途

define([
  'dojo/request',
  'dojo/node!@theintern/leadfoot/helpers/pollUntil'
], 
function(request, _pollUntil) { 

   var pollUntil = _pollUntil.default;
   var registerSuite = intern.getInterface('object').registerSuite;
   var assert = intern.getPlugin('chai').assert;

});