diff --git a/src/test/tests/unit/assets/general-tests.js b/src/test/tests/unit/assets/general-tests.js index 6b7fab51b8e..96b1d6f0288 100644 --- a/src/test/tests/unit/assets/general-tests.js +++ b/src/test/tests/unit/assets/general-tests.js @@ -101,6 +101,21 @@ YUI.add('general-tests', function(Y) { self.wait(); }, + 'test: next() bounds the function to the test': function () { + var self = this; + + self.foo = 'bar'; + + function async(callback) { + setTimeout(callback, 0); + } + + async(self.next(function () { + self.assert(this.foo === 'bar'); + })); + + self.wait(); + }, _should: { error: { 'test: resume without wait': true