Skip to content

Commit

Permalink
issue #302 - unit tests for CS _this idiom
Browse files Browse the repository at this point in the history
  • Loading branch information
bjouhier committed Nov 4, 2015
1 parent 7104974 commit b19f089
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/common/eval-test._js
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,15 @@ asyncTest("coffeescript wrapper 2", 1, function(_) {
}, "cs2");
})

asyncTest("coffeescript wrapper 2b", 1, function(_) {
evalTest(function f(_) {
var _this = this;
return (function() {
return delay(_, "cs2");
}).call(_this);
}, "cs2");
})

asyncTest("coffeescript wrapper 3", 1, function(_) {
evalTest(function f(_) {
return (function() {
Expand All @@ -664,6 +673,15 @@ asyncTest("coffeescript wrapper 3", 1, function(_) {
}, "cs3");
})

asyncTest("coffeescript wrapper 3b", 1, function(_) {
evalTest(function f(_) {
var _this = this;
return (function() {
return delay(_, "cs3");
}).apply(_this, arguments);
}, "cs3");
})

asyncTest("sync try/catch in async", 1, function(_) {
evalTest(function f(_) {
try {
Expand Down

0 comments on commit b19f089

Please sign in to comment.