test: remove test
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
b6b3759758
commit
e44d6a2915
|
@ -1,56 +0,0 @@
|
|||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import TicketEditMana from 'src/pages/Ticket/Card/TicketEditMana.vue';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
|
||||
describe('TicketEditMana', () => {
|
||||
let vm;
|
||||
let wrapper;
|
||||
function generateWrapper(props = {}) {
|
||||
wrapper = createWrapper(TicketEditMana, {
|
||||
props,
|
||||
});
|
||||
wrapper = wrapper.wrapper;
|
||||
vm = wrapper.vm;
|
||||
}
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
describe('mana prop tests', async () => {
|
||||
it('should show spinner when mana is null', async () => {
|
||||
generateWrapper({ mana: null });
|
||||
await vm.$nextTick();
|
||||
expect(vm.hasMana).toBe(false);
|
||||
});
|
||||
|
||||
it('should show spinner when mana is undefined', async () => {
|
||||
generateWrapper({ mana: undefined });
|
||||
expect(typeof undefined === 'number').toBe(false);
|
||||
await vm.$nextTick();
|
||||
expect(vm.hasMana).toBe(false);
|
||||
});
|
||||
|
||||
it('should display negative mana value', async () => {
|
||||
generateWrapper({ mana: -1000 });
|
||||
expect(typeof -1000 === 'number').toBe(true);
|
||||
await vm.$nextTick();
|
||||
expect(vm.hasMana).toBe(true);
|
||||
});
|
||||
|
||||
it('should display zero mana value', async () => {
|
||||
generateWrapper({ mana: 0 });
|
||||
expect(typeof 0 === 'number').toBe(true);
|
||||
await vm.$nextTick();
|
||||
expect(vm.hasMana).toBe(true);
|
||||
});
|
||||
|
||||
it('should display positive mana value', async () => {
|
||||
generateWrapper({ mana: 1000 });
|
||||
expect(typeof 1000 === 'number').toBe(true);
|
||||
await vm.$nextTick();
|
||||
expect(vm.hasMana).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue