Mailspring/internal_packages/notifications/spec/dev-mode-notif-spec.jsx
Halla Moore 9e3c3c14cd feat(sidebar-notifs) Create sidebar notifications to replace old bars
Summary:
Move the old bar notifications to the sidebar, and only display one notification
at a time using a priority-rating system. Remove all of the old notification
infrastructure.

Test Plan: Added specs, also reproduced notifications locally

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3310
2016-10-04 08:08:23 -07:00

25 lines
829 B
JavaScript

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);
})
})
});