Skip to content

Commit

Permalink
[test] adding test case against #4
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Jan 29, 2020
1 parent 44040bf commit 9343fd4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ describe('env-variable', function () {
assume(data.foo).equals('bar');
});

it('does not throw when window.localStorage throws', function () {
global.window = global.window || {};

Object.defineProperty(window, 'localStorage', {
get: function () {
throw new Error('NOT ACCESSIBLE IN PRIVATE BROWSING')
}
});

env();
});

describe('#merge', function () {
it('merges objects', function () {
const data = {};
Expand Down

0 comments on commit 9343fd4

Please sign in to comment.