mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
feat(test): EpisodeProgress tests
This commit is contained in:
parent
1881c60407
commit
7d3215a323
2 changed files with 24 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import Component from './EpisodeProgress.vue'
|
||||
import factory from '@/__tests__/factory'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
||||
it('renders', () => {
|
||||
const { html } = this.render(Component, {
|
||||
props: {
|
||||
episode: factory('episode', {
|
||||
length: 300
|
||||
}),
|
||||
position: 60
|
||||
}
|
||||
})
|
||||
|
||||
expect(html()).toMatchSnapshot()
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
// Vitest Snapshot v1
|
||||
|
||||
exports[`renders 1`] = `<div class="relative h-1 w-full rounded-full overflow-hidden bg-white/30"><span class="absolute h-full bg-k-accent top-0 left-0" style="width: 20%;"></span></div>`;
|
Loading…
Reference in a new issue