Files
swagger-ui/test/unit/core/plugins/configs/actions.js
Vladimír Gorej edd1153723 feat: expose plugins and presets on SwaggerUI global symbol (#9189)
Part of this commit is also:
- complete plugins consolidation
- complete presets consolidation
- build system consolidation

Refs #9188
2023-09-05 09:56:51 +02:00

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)
})
})
})