Fixing builder jest tests.
This commit is contained in:
parent
24eebd9b98
commit
c15aafe6a2
|
@ -53,7 +53,7 @@ describe("Datasources Store", () => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(get(store).list).toEqual(expect.arrayContaining([SAVE_DATASOURCE]))
|
expect(get(store).list).toEqual(expect.arrayContaining([SAVE_DATASOURCE.datasource]))
|
||||||
})
|
})
|
||||||
it("deletes a datasource, updates the store and returns status message", async () => {
|
it("deletes a datasource, updates the store and returns status message", async () => {
|
||||||
api.get.mockReturnValue({ json: () => SOME_DATASOURCE})
|
api.get.mockReturnValue({ json: () => SOME_DATASOURCE})
|
||||||
|
|
|
@ -13,13 +13,15 @@ export const SOME_DATASOURCE = [
|
||||||
]
|
]
|
||||||
|
|
||||||
export const SAVE_DATASOURCE = {
|
export const SAVE_DATASOURCE = {
|
||||||
type: "datasource",
|
datasource: {
|
||||||
name: "CoolDB",
|
type: "datasource",
|
||||||
source: "REST",
|
name: "CoolDB",
|
||||||
config: {
|
source: "REST",
|
||||||
url: "localhost",
|
config: {
|
||||||
defaultHeaders: {},
|
url: "localhost",
|
||||||
|
defaultHeaders: {},
|
||||||
|
},
|
||||||
|
_id: "datasource_04b003a7b4a8428eadd3bb2f7eae0255",
|
||||||
|
_rev: "1-4e72002f1011e9392e655948469b7908",
|
||||||
},
|
},
|
||||||
_id: "datasource_04b003a7b4a8428eadd3bb2f7eae0255",
|
|
||||||
_rev: "1-4e72002f1011e9392e655948469b7908",
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue