salix-front/test/vitest/__tests__/pages/Claims/ClaimPhoto.spec.js

33 lines
942 B
JavaScript

import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
import { ref } from 'vue';
import { createWrapper, axios } from 'app/test/vitest/helper';
import ClaimPhoto from 'pages/Claim/Card/ClaimPhoto.vue';
describe('ClaimPhoto', () => {
let vm;
beforeAll(() => {
vm = createWrapper(ClaimPhoto).vm;
//setup: () => { claimDms: ref([])
});
afterEach(() => {
//vi.clearAllMocks();
});
describe('viewDeleteDms()', () => {
it('should call quasar dialog', async () => {
console.log(vm.quasar);
vi.spyOn(axios, 'get').mockResolvedValue();
vi.spyOn(axios, 'post').mockResolvedValue();
vi.spyOn(vm.quasar, 'notify');
// await vm.viewDeleteDms();
// expect(vm.quasar.notify).toHaveBeenCalledWith(
// expect.objectContaining({ type: 'positive' })
// );
});
});
});