/** * Fireblocks API * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) * * The version of the OpenAPI document: 1.6.2 * Contact: developers@fireblocks.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { convertToFireblocksResponse } from "../response/fireblocksResponse"; import { AxiosRequestConfig, AxiosResponse } from "axios"; describe("Fireblocks Response Tests", () => { describe('ConvertToFireblocksResponse tests', () => { it('Should return full fireblocks response when axios response schema is full', async () => { const axiosResponse = { data: 'Mocked data', status: 200, statusText: "200", headers: {"X-My-Header": "my-header-value"}, config: {} as AxiosRequestConfig as any, }; const res = convertToFireblocksResponse(axiosResponse); expect(res).toEqual({ data: 'Mocked data', statusCode: 200, headers: {"X-My-Header": "my-header-value"} }); }); it('Should return data undefined when axios response is missing data property', async () => { const axiosResponse = { status: 200, statusText: "200", headers: {"X-My-Header": "my-header-value"}, config: {} as AxiosRequestConfig as any, }; const res = convertToFireblocksResponse(axiosResponse as any); expect(res).toEqual({ data: undefined, statusCode: 200, headers: {"X-My-Header": "my-header-value"} }); }); }); });