From d0ac1bd29906a4fa81ab8c5fc739045d2952eca5 Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 14 Jan 2016 23:53:20 +0100 Subject: [PATCH] test(reset): extended test with event listener --- tests/integration/reset.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/reset.js b/tests/integration/reset.js index 7919786..e6735bf 100644 --- a/tests/integration/reset.js +++ b/tests/integration/reset.js @@ -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') @@ -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', {