mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
26 lines
829 B
React
26 lines
829 B
React
|
import {mount} from 'enzyme';
|
||
|
import {React} from 'nylas-exports';
|
||
|
import DevModeNotification from '../lib/items/dev-mode-notif';
|
||
|
|
||
|
describe("DevModeNotif", function DevModeNotifTests() {
|
||
|
describe("When the window is in dev mode", () => {
|
||
|
beforeEach(() => {
|
||
|
spyOn(NylasEnv, "inDevMode").andReturn(true);
|
||
|
this.notif = mount(<DevModeNotification />);
|
||
|
})
|
||
|
it("displays a notification", () => {
|
||
|
expect(this.notif.find('.notification').isEmpty()).toEqual(false);
|
||
|
})
|
||
|
})
|
||
|
|
||
|
describe("When the window is not in dev mode", () => {
|
||
|
beforeEach(() => {
|
||
|
spyOn(NylasEnv, "inDevMode").andReturn(false);
|
||
|
this.notif = mount(<DevModeNotification />);
|
||
|
})
|
||
|
it("doesn't display a notification", () => {
|
||
|
expect(this.notif.find('.notification').isEmpty()).toEqual(true);
|
||
|
})
|
||
|
})
|
||
|
});
|