Skip to content

Commit

Permalink
Moving everything into factories
Browse files Browse the repository at this point in the history
  • Loading branch information
dasunpubudumal committed Oct 2, 2024
1 parent 30f8ac6 commit 50bc342
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/unit/store/traction/saphyr/tubes/actions.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Data } from '@support/testHelper'
import Response from '@/api/v1/Response'
import * as Actions from '@/store/traction/saphyr/tubes/actions'
import SaphyrTubesFactory from '@tests/factories/SaphyrTubesFactory.js'
Expand Down Expand Up @@ -101,8 +100,8 @@ describe('#createLibrariesInTraction', () => {
})

it('successfully', async () => {
const expectedResponse = new Response(Data.TubeWithLibrary)
create.mockReturnValue(Data.TubeWithLibrary)
const expectedResponse = new Response(tubeWithLibraryFactory.responses.axios)
create.mockReturnValue(tubeWithLibraryFactory.responses.axios)

const response = await Actions.createLibrariesInTraction({ getters }, payload)
expect(response).toEqual(expectedResponse)
Expand Down Expand Up @@ -175,7 +174,7 @@ describe('#setLibraries', () => {
})

it('successfully', async () => {
get.mockReturnValue(Data.TractionSaphyrLibraries)
get.mockReturnValue(saphyrTubesFactory.responses.axios)

const libraries = await Actions.setLibraries({ commit, getters })

Expand Down

0 comments on commit 50bc342

Please sign in to comment.