Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juanluispaz committed Aug 3, 2019
1 parent 7233cff commit 364c8d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/js/miscellaneous.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,16 @@ test('containsErrors method on object (rejected promise)', function() {
expect(b.childrenContainErrors()).toBe(true);
});
});

test('preserve exception when set error on a valid binder', function() {
var error = undefined;
var b = binder(99, function() {
if (error) {
throw error;
}
});
error = new Error();
return b.setError(Promise.resolve('error message')).catch(function (e) {
expect(e).toBe(error);
});
})

0 comments on commit 364c8d8

Please sign in to comment.