mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-11-28 08:40:25 +00:00
test(timeutils): adds testing for timeUtils mixin
This commit is contained in:
parent
0a5cd7922c
commit
bac67c1245
16
mixins/__tests__/timeUtils.spec.ts
Normal file
16
mixins/__tests__/timeUtils.spec.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import Vue from 'vue';
|
||||
import timeUtils from '~/mixins/timeUtils.ts';
|
||||
|
||||
const TestComponent = new Vue({
|
||||
mixins: [timeUtils]
|
||||
});
|
||||
|
||||
describe('timeUtils', () => {
|
||||
test('converts time from ms to ticks', () => {
|
||||
expect(TestComponent.ticksToMs(10000)).toEqual(1);
|
||||
});
|
||||
|
||||
test('converts time from ticks to ms', () => {
|
||||
expect(TestComponent.msToTicks(1)).toEqual(10000);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user