storj/web/satellite/tests/unit/notifications/NotificationArea.spec.ts
Yehor Butko 7090a31ef3
V3-1033 Implement AppState module for DropDown lists (#1008)
* V3-1033 Implement AppState module for DropDown lists

* commentig unused items
2019-01-09 17:40:21 +02:00

38 lines
945 B
TypeScript

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
import { shallowMount, mount } from '@vue/test-utils';
import NotificationArea from '@/components/notifications/NotificationArea.vue';
import { NOTIFICATION_TYPES } from '@/utils/constants/notification';
import { DelayedNotification } from '@/types/DelayedNotification';
describe('Notification.vue', () => {
it('renders correctly', () => {
const wrapper = shallowMount(NotificationArea, {
computed: {
currentNotification: jest.fn(),
},
});
expect(wrapper).toMatchSnapshot();
});
it('renders correctly with notification', () => {
const testMessage = 'testMessage';
const notification = new DelayedNotification(
jest.fn(),
NOTIFICATION_TYPES.SUCCESS,
testMessage
);
const wrapper = mount(NotificationArea, {
computed: {
currentNotification: () => notification,
}
});
expect(wrapper).toMatchSnapshot();
});
});