fix last query test
This commit is contained in:
parent
003c1c75d4
commit
e1034ae5ac
|
@ -68,7 +68,6 @@ export function createQueriesStore() {
|
|||
|
||||
return state
|
||||
})
|
||||
console.log(response)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,11 +45,9 @@ 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})
|
||||
console.log('After Fetch: ', get(store))
|
||||
|
||||
await store.fetch()
|
||||
|
||||
api.delete.mockReturnValue({status: 200, message: 'Datasource deleted.'})
|
||||
api.delete.mockReturnValue({status: 200, message: `Query deleted.`})
|
||||
|
||||
await store.delete(SOME_QUERY)
|
||||
expect(get(store)).toEqual({ list: [], selected: null})
|
||||
|
|
Loading…
Reference in New Issue