-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Intern 2.0 and improve functional test scaffold
- Loading branch information
1 parent
1aab10a
commit 2f0ddfc
Showing
7 changed files
with
50 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
define([ | ||
'intern/dojo/node!leadfoot/helpers/pollUntil' | ||
], function (pollUntil) { | ||
/* global __ready__ */ | ||
function remoteReady(timeout) { | ||
if (isNaN(timeout)) { | ||
timeout = 5000; | ||
} | ||
return pollUntil( | ||
function () { | ||
if (typeof __ready__ !== 'undefined') { | ||
return __ready__ || null; | ||
} | ||
}, | ||
timeout == null ? 5000 : timeout | ||
); | ||
} | ||
|
||
return remoteReady; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
define([ | ||
'intern!object', | ||
'intern/chai!assert', | ||
'<%= appname %>/tests/remoteReady', | ||
'require' | ||
], function (registerSuite, assert, require) { | ||
], function (registerSuite, assert, remoteReady, require) { | ||
registerSuite({ | ||
name: '<%= name %>', | ||
|
||
setup: function () { | ||
return this.get('remote').get(require.toUrl('./<%= name %>.html')) | ||
.waitForCondition('!!testReady', 5000); | ||
return this.get('remote') | ||
.get(require.toUrl('./<%= name %>.html')) | ||
.then(remoteReady()); | ||
} | ||
}); | ||
}); |