2015-02-07 14:34:23 +02:00

10 lines
207 B
JavaScript

var timeLimit = Date.now() + 5000;
assert.equal((function f(n) {
assert.operator(Date.now(), '<', timeLimit, "Timeout");
if (n <= 0) {
return "foo";
}
return f(n - 1);
})(1e6), "foo");