-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
548c9ba
commit 93e3c4a
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"use strict"; | ||
|
||
define(['ably', 'shared_helper'], function(Ably, helper) { | ||
beforeAll(helper.setupApp); | ||
afterAll(helper.tearDownApp); | ||
|
||
describe('Realtime EventEmitter', function() { | ||
it('swallows exceptions, does not log the error, and leaves the suite hanging on failure waiting for a timeout', function(done) { | ||
var realtime = helper.AblyRealtime({ key: 1 }); | ||
var channel = realtime.channels.get('doesNotHavePermission'); | ||
|
||
channel.attach(function(err) { | ||
if (err) { | ||
console.log(err); | ||
assert(false, 'failed'); | ||
} | ||
assert.ok(true, 'passed'); | ||
done(); | ||
}); | ||
}, 5000); | ||
}); | ||
|
||
describe('Test suite behaviour', function() { | ||
it('stops immediately when an exception is raised in an async block', function(done) { | ||
setTimeout(function() { | ||
assert(false, 'failed'); | ||
}, 1000); | ||
}, 5000); | ||
}); | ||
}); |