diff --git a/test/browser-tests/push-client/get-subscription.js b/test/browser-tests/push-client/get-subscription.js index de63f0b..fd32d95 100644 --- a/test/browser-tests/push-client/get-subscription.js +++ b/test/browser-tests/push-client/get-subscription.js @@ -28,6 +28,7 @@ describe('Test getSubscription()', function() { } const EMPTY_SW_PATH = '/test/browser-tests/push-client/empty-sw.js'; + const NON_EXISTANT_SW_PATH = '/test/browser-tests/push-client/doesnt-exist.js'; const EXAMPLE_SUBSCRIPTION = { endpoint: '/endpoint' }; @@ -95,7 +96,7 @@ describe('Test getSubscription()', function() { it('should reject the promise when no registration is set', function(done) { stateStub = window.StateStub.getStub(); - const pushClient = new window.goog.propel.PropelClient(EMPTY_SW_PATH); + const pushClient = new window.goog.propel.PropelClient(NON_EXISTANT_SW_PATH); pushClient.getSubscription() .then(() => done(new Error('getSubscription should reject when no registration is available'))) .catch(() => done()); diff --git a/test/browser-tests/push-client/unsubscribe.js b/test/browser-tests/push-client/unsubscribe.js index dd2f19a..655cf13 100644 --- a/test/browser-tests/push-client/unsubscribe.js +++ b/test/browser-tests/push-client/unsubscribe.js @@ -28,6 +28,7 @@ describe('Test unsubscribe()', function() { } const EMPTY_SW_PATH = '/test/browser-tests/push-client/empty-sw.js'; + const NON_EXISTANT_SW_PATH = '/test/browser-tests/push-client/doesnt-exist.js'; const EXAMPLE_SUBSCRIPTION = { endpoint: '/endpoint' }; @@ -100,7 +101,7 @@ describe('Test unsubscribe()', function() { stateStub = window.StateStub.getStub(); stateStub.setPermissionState('default'); - const pushClient = new window.goog.propel.PropelClient(EMPTY_SW_PATH); + const pushClient = new window.goog.propel.PropelClient(NON_EXISTANT_SW_PATH); pushClient.unsubscribe() .then(() => done(new Error('Expected an error to be thrown when no registration'))) .catch(() => done());