1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00

fix last query test

This commit is contained in:
Keviin Åberg Kultalahti 2021-03-29 17:50:12 +02:00
parent 003c1c75d4
commit e1034ae5ac
2 changed files with 4 additions and 7 deletions

View file

@ -68,7 +68,6 @@ export function createQueriesStore() {
return state
})
console.log(response)
},
}
}

View file

@ -45,12 +45,10 @@ describe("Queries Store", () => {
expect(get(store).list).toEqual(expect.arrayContaining([SOME_QUERY]))
})
it("deletes a datasource, updates the store and returns status message", async () => {
api.get.mockReturnValue({ json: () => SOME_QUERY})
await store.fetch()
api.delete.mockReturnValue({status: 200, message: 'Datasource deleted.'})
console.log('After Fetch: ', get(store))
api.delete.mockReturnValue({status: 200, message: `Query deleted.`})
await store.delete(SOME_QUERY)
expect(get(store)).toEqual({ list: [], selected: null})
})