import superset from "./superset"

describe("Superset tests", () => {
  it("Outdated API doesn't cause problems", async () => {
    process.env.REACT_APP_SUPERSET_KEYS_LIST = "11111100-0000-1111-1111-000000000000"
    global.fetch = jest.fn(() => {
      return { status: 404 }
    }
    );

    const res = await superset.getEmbeddedDashboards()
    expect(res).toHaveLength(1)
    expect(res[0].embedded_id).toBe("11111100-0000-1111-1111-000000000000")
  })
})