test: make component and mixin description more explicit

This commit is contained in:
MrTimscampi 2021-02-27 12:19:49 +01:00
parent 48b4da206c
commit 7cf905df76
8 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ import Vuex, { Store } from 'vuex';
import Vue from 'vue';
import LikeButton from '../LikeButton.vue';
describe('LikeButton', () => {
describe('component: LikeButton', () => {
const localVue = createLocalVue();
let vuetify: Vuetify;
let store: Store<unknown>;

View File

@ -32,7 +32,7 @@ const wrapper = mount(PlayButton, {
store
});
describe('PlayButton', () => {
describe('component: PlayButton', () => {
it('shows the text "play"', (): void => {
expect(wrapper.text()).toBe('play');
});

View File

@ -12,7 +12,7 @@ beforeEach(() => {
});
});
describe('BlurhashCanvas', () => {
describe('component: BlurhashCanvas', () => {
it('has a hash property of type String', () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

View File

@ -16,7 +16,7 @@ const wrapper = mount(SettingsPage, {
}
});
describe('SettingsPage', () => {
describe('component: SettingsPage', () => {
it('shows content, action and title if all are defined', () => {
expect(wrapper.text()).toContain('test-page-title');
expect(wrapper.text()).toContain('This is a demo action');

View File

@ -21,7 +21,7 @@ const FORMS_EXPECTED_OUTPUT = [
{ value: { name: 'eee' } }
];
describe('formsHelper', () => {
describe('mixin: formsHelper', () => {
it('correctly itemizes the array of items', () => {
expect(TestComponent.getItemizedSelect(FORMS_TEST_INPUT)).toMatchObject(
FORMS_EXPECTED_OUTPUT

View File

@ -5,7 +5,7 @@ const TestComponent = new Vue({
mixins: [htmlHelper]
});
describe('formsHelper', () => {
describe('mixin: htmlHelper', () => {
it('correctly sanitizes HTML', () => {
/*
NOTE: It is not our place to test if the library used is secure.

View File

@ -5,7 +5,7 @@ const TestComponent = new Vue({
mixins: [itemHelper]
});
describe('itemHelper', () => {
describe('mixin: itemHelper', () => {
it('returns true if the item can be played', () => {
// TODO: Replace with BaseItemKind enum
expect(TestComponent.canPlay({ Type: 'AggregateFolder' })).toEqual(false);

View File

@ -5,7 +5,7 @@ const TestComponent = new Vue({
mixins: [timeUtils]
});
describe('timeUtils', () => {
describe('mixin: timeUtils', () => {
it('converts time from ms to ticks', () => {
expect(TestComponent.ticksToMs(10000)).toEqual(1);