koel/resources/assets/js/components/profile-preferences/ThemeList.spec.ts

15 lines
423 B
TypeScript
Raw Normal View History

import { expect, it } from 'vitest'
import { themeStore } from '@/stores'
2022-05-13 17:58:38 +00:00
import UnitTestCase from '@/__tests__/UnitTestCase'
2022-07-10 15:59:26 +00:00
import themes from '@/themes'
import ThemeList from './ThemeList.vue'
2022-05-13 17:58:38 +00:00
new class extends UnitTestCase {
protected test () {
it('displays all themes', () => {
2022-07-10 15:59:26 +00:00
themeStore.init()
expect(this.render(ThemeList).getAllByTestId('theme-card').length).toEqual(themes.length)
})
}
}