Part of this commit is also: - complete plugins consolidation - complete presets consolidation - build system consolidation Refs #9188
26 lines
597 B
JavaScript
26 lines
597 B
JavaScript
import { downloadConfig } from "core/plugins/configs/spec-actions"
|
|
|
|
describe("configs plugin - actions", () => {
|
|
|
|
describe("downloadConfig", () => {
|
|
it("should call the system fetch helper with a provided request", () => {
|
|
const fetchSpy = jest.fn(async () => {})
|
|
const system = {
|
|
fn: {
|
|
fetch: fetchSpy
|
|
}
|
|
}
|
|
|
|
const req = {
|
|
url: "http://swagger.io/one",
|
|
requestInterceptor: a => a,
|
|
responseInterceptor: a => a,
|
|
}
|
|
|
|
downloadConfig(req)(system)
|
|
|
|
expect(fetchSpy).toHaveBeenCalledWith(req)
|
|
})
|
|
})
|
|
})
|