[REM] test runner feature which probably caused more trouble than it caught
avoid catching exception in executed callback, it just hinders debugging by generated completely bonkers traces bzr revid: xmo@openerp.com-20121116105554-hu45anetrj1a8tl6
This commit is contained in:
parent
796e80ec2d
commit
e1e4c48c18
|
@ -115,13 +115,7 @@ openerp.testing = {};
|
|||
setup();
|
||||
}, failure);
|
||||
} else {
|
||||
var actual_call;
|
||||
try {
|
||||
actual_call = $.when(fn.apply(null, args))
|
||||
} catch (e) {
|
||||
actual_call = $.Deferred().reject(e);
|
||||
}
|
||||
actual_call.then(success, failure);
|
||||
$.when(fn.apply(null, args)).then(success, failure);
|
||||
}
|
||||
};
|
||||
var teardown = function () {
|
||||
|
|
|
@ -24,15 +24,6 @@ openerp.testing.section('testing.stack', function (test) {
|
|||
strictEqual(val, 42, "should return the handler value")
|
||||
});
|
||||
});
|
||||
test('direct, value, error', {asserts: 1}, function () {
|
||||
var s = openerp.testing.Stack();
|
||||
return s.execute(function () {
|
||||
throw new Error("foo");
|
||||
}).then(reject, function (f) {
|
||||
strictEqual(f.message, "foo", "should reject with exception");
|
||||
return $.when();
|
||||
});
|
||||
});
|
||||
test('direct, deferred, failure', {asserts: 1}, function () {
|
||||
var s = openerp.testing.Stack();
|
||||
return s.execute(function () {
|
||||
|
|
Loading…
Reference in New Issue