mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-04 07:10:06 +08:00
25 lines
838 B
JavaScript
25 lines
838 B
JavaScript
import { mount } from 'enzyme';
|
|
import { React } from 'mailspring-exports';
|
|
import DevModeNotification from '../lib/items/dev-mode-notif';
|
|
|
|
describe('DevModeNotif', function DevModeNotifTests() {
|
|
describe('When the window is in dev mode', () => {
|
|
beforeEach(() => {
|
|
spyOn(AppEnv, 'inDevMode').andReturn(true);
|
|
this.notif = mount(<DevModeNotification />);
|
|
});
|
|
it('displays a notification', () => {
|
|
expect(this.notif.find('.notification').exists()).toEqual(true);
|
|
});
|
|
});
|
|
|
|
describe('When the window is not in dev mode', () => {
|
|
beforeEach(() => {
|
|
spyOn(AppEnv, 'inDevMode').andReturn(false);
|
|
this.notif = mount(<DevModeNotification />);
|
|
});
|
|
it("doesn't display a notification", () => {
|
|
expect(this.notif.find('.notification').exists()).toEqual(false);
|
|
});
|
|
});
|
|
});
|