Skip to content

Commit

Permalink
in this test, we should actually see onerror twice. (false positive c…
Browse files Browse the repository at this point in the history
…ase)
  • Loading branch information
stefanpenner committed Aug 7, 2014
1 parent 9177080 commit 96b5ec2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/tests/extension-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ describe("RSVP extensions", function() {
RSVP.off('error');
});

it("When provided, any unhandled exceptions are sent to it", function(done) {
it("When provided, any unhandled exceptions are sent to it (false positive case)", function(done) {
var thrownError = new Error();

RSVP.configure('onerror', function(error) {
Expand Down Expand Up @@ -1333,9 +1333,13 @@ describe("RSVP extensions", function() {
it("assimilation: When provided, unhandled exceptions are sent to it", function(done) {
var thrownError = new Error();

var count = 0;
RSVP.configure('onerror', function(error) {
assert(true, "Should get here");
done();
count++;
assert(count <= 2, "Should get here twice");
if (count === 2) {
done();
}
});

var promise = new RSVP.Promise(function(resolve, reject) {
Expand Down

0 comments on commit 96b5ec2

Please sign in to comment.