forked from processing/p5.js-web-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nav.unit.test.jsx
32 lines (26 loc) · 927 Bytes
/
Nav.unit.test.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from 'react';
import { reduxRender } from '../../../../test-utils';
import Nav from './Nav';
jest.mock('../../../../utils/generateRandomName');
describe('Nav', () => {
it('renders editor version for desktop', () => {
const { asFragment } = reduxRender(<Nav />, { mobile: false });
expect(asFragment()).toMatchSnapshot();
});
it('renders editor version for mobile', () => {
const { asFragment } = reduxRender(<Nav />, { mobile: true });
expect(asFragment()).toMatchSnapshot();
});
it('renders dashboard version for desktop', () => {
const { asFragment } = reduxRender(<Nav layout="dashboard" />, {
mobile: false
});
expect(asFragment()).toMatchSnapshot();
});
it('renders dashboard version for mobile', () => {
const { asFragment } = reduxRender(<Nav layout="dashboard" />, {
mobile: true
});
expect(asFragment()).toMatchSnapshot();
});
});