storj/web/satellite/tests/unit/notifications/NotificationArea.spec.ts
Vitalii c5bca894fd web/satellite: fix linter
Added imports linting, trailing commas, trailing semicolons, single quotes and spaces between curly braces.

Change-Id: I5de5d3eea48753dfe2737983b230bafaffe898c8
2022-09-09 11:02:04 +00:00

51 lines
1.4 KiB
TypeScript

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