mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-12-03 19:50:52 +00:00
test: make component and mixin description more explicit
This commit is contained in:
parent
48b4da206c
commit
7cf905df76
@ -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>;
|
||||
|
@ -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');
|
||||
});
|
||||
|
@ -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
|
||||
|
@ -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');
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user