Skip to content

Commit

Permalink
DEV test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Dec 23, 2022
1 parent c33bd16 commit 727b4e4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/__tests__/__snapshots__/global.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,13 @@ exports[`Global should return specific properties: specific properties 1`] = `
},
}
`;

exports[`Global should set a one-time mutable OPTIONS object: immutable 1`] = `
{
"OPTIONS": {
"contextPath": "../src/__fixtures__",
"lorem": "ipsum",
},
"isFrozen": true,
}
`;
9 changes: 9 additions & 0 deletions src/__tests__/global.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ describe('Global', () => {
it('should return specific properties', () => {
expect(global).toMatchSnapshot('specific properties');
});

it('should set a one-time mutable OPTIONS object', () => {
const { OPTIONS } = global;
OPTIONS._set = { lorem: 'ipsum' };
OPTIONS.lorem = 'hello world';
OPTIONS.dolor = 'sit';

expect({ isFrozen: Object.isFrozen(OPTIONS), OPTIONS }).toMatchSnapshot('immutable');
});
});

0 comments on commit 727b4e4

Please sign in to comment.