Skip to content

Commit

Permalink
test(reset): extended test with event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias committed Jan 14, 2016
1 parent 087190e commit d0ac1bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/reset.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test('connection.reset() resets the timestamp', function (t) {
})

test('connection.reset() resets any errors', function (t) {
t.plan(2)
t.plan(3)

store.setObject('connection_https://example.com/ping', {
error: new Error('no soup for you')
Expand All @@ -63,6 +63,10 @@ test('connection.reset() resets any errors', function (t) {
url: 'https://example.com/ping'
})

connectionStatus.on('reset', function () {
t.pass('connectionStatus "reset" event triggered')
})

t.is(connectionStatus.ok, undefined, 'connection status is in error')
connectionStatus.reset().then(function () {
store.setObject('connection_https://example.com/ping', {
Expand Down

0 comments on commit d0ac1bd

Please sign in to comment.