Skip to content

Commit

Permalink
Build Test module
Browse files Browse the repository at this point in the history
  • Loading branch information
juandopazo committed Feb 27, 2014
1 parent f9b0cf0 commit 0735523
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build/test/test-coverage.js

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions build/test/test-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ YUITest.TestCase.prototype = {
@method next
@param {Function} callback Callback to call after resuming the test.
@param {Object} [context] The value of `this` inside the callback.
If not given, the original context of the function will be used.
@return {Function} wrapped callback that resumes the test.
@example
```
Expand All @@ -354,12 +356,16 @@ YUITest.TestCase.prototype = {
test.wait();
```
**/
next: function (callback) {
next: function (callback, context) {
var self = this;
context = arguments.length >= 2 ? arguments[1] : undefined;
return function () {
var args = arguments;
if (context === undefined) {
context = this;
}
self.resume(function () {
callback.apply(this, args);
callback.apply(context, args);
});
};
},
Expand Down
Loading

0 comments on commit 0735523

Please sign in to comment.