Skip to content

Commit

Permalink
test: cover the rest of the file
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Schetrite - SumUp POS committed Nov 17, 2022
1 parent e80f7d7 commit d7e64c7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/circuit-ui/components/Checkbox/Checkbox.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,26 @@ describe('Checkbox', () => {
expect(actual).toMatchSnapshot();
});

describe('tests with custom globals', () => {
/* eslint-disable no-console */
const warn = jest.fn();
const oldWarn = console.warn;
const oldEnv = process.env.NODE_ENV;
beforeAll(() => {
console.warn = warn;
process.env.NODE_ENV = 'other';
});
afterAll(() => {
console.warn = oldWarn;
process.env.NODE_ENV = oldEnv;
});

it('should deprecate the nomargin', () => {
create(<Checkbox {...defaultProps} />);
expect(warn).toBeCalledTimes(1);
});
});

/**
* Logic tests.
*/
Expand Down

0 comments on commit d7e64c7

Please sign in to comment.