feat(tests): refactor

This commit is contained in:
2024-03-26 17:59:32 +03:00
parent f6ca446f92
commit 49626cb681
23 changed files with 128 additions and 136 deletions

View File

@@ -1,4 +1,4 @@
import {describe, test, expect} from 'vitest'
import {describe, test, expect, vi} from 'vitest'
import AdapterOfMachines from "@adapters/AdapterOfMachines.js"
import axios from 'axios'
import {apiModalListMachines, appModalListMachines} from "@mocks/machines.js"

View File

@@ -0,0 +1,15 @@
import {describe, test, expect, vi} from 'vitest'
import AdapterOfPacks from "@adapters/AdapterOfPacks.js"
import axios from 'axios'
vi.mock('axios')
describe('AdapterOfMachines', () => {
axios.post.mockResolvedValue({data: []})
test('AdapterOfMachines should be a object', () => {
const adapterOfMachines = new AdapterOfPacks('')
expect(typeof adapterOfMachines).toBe('object')
})
})