storj/web/satellite/tests/unit/common/VerticalArrows.spec.ts

43 lines
1.2 KiB
TypeScript
Raw Normal View History

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
import VerticalArrows from '@/components/common/VerticalArrows.vue';
2019-09-09 11:33:39 +01:00
import { SortingDirectionEnum } from '@/types/sortingArrows';
2019-09-09 11:33:39 +01:00
import { mount } from '@vue/test-utils';
describe('VerticalArrows.vue', () => {
it('should render with bottom arrow highlighted', function () {
const wrapper = mount(VerticalArrows, {
propsData: {
isActive: true,
direction: SortingDirectionEnum.BOTTOM
}
});
expect(wrapper).toMatchSnapshot();
});
it('should render without any highlighted arrows', function () {
const wrapper = mount(VerticalArrows, {
propsData: {
isActive: false,
direction: SortingDirectionEnum.BOTTOM
}
});
expect(wrapper).toMatchSnapshot();
});
it('should render with top arrow highlighted', function () {
const wrapper = mount(VerticalArrows, {
propsData: {
isActive: true,
direction: SortingDirectionEnum.TOP
}
});
expect(wrapper).toMatchSnapshot();
});
});