How to load pollUntil helper into Intern 2 functional tests

The intern 2 documentation provides the following example of waiting for a condition to be met on a test page after it loads:

this.remote .get(require.toUrl('./SomeTest.html')) .then(pollUntil('return window.ready;', 5000)); 

Unfortunately, he does not explain how to download the pollUntil helper to use it in the previous example ... Does anyone have a complete working example that uses pollUntil?

Thank you for your help.

+6
source share
1 answer

I think I found the answers: it works by loading the module intern/dojo/node!leadfoot/helpers/pollUntil , as in:

 define([ 'intern!object', 'intern/chai!assert', 'intern/dojo/node!leadfoot/helpers/pollUntil', '../Request', 'require' ], function (registerSuite, assert, pollUntil, Request, require) { 
+6
source

Source: https://habr.com/ru/post/971798/


All Articles