version: 1.0.30 #1

Merged
leandro merged 18 commits from development into master 2025-06-27 20:36:01 +00:00
Showing only changes of commit 86704b83b1 - Show all commits

View file

@ -4,7 +4,7 @@ import { ContentType, LhispOauthClientConstructorParams } from "../src/lhisp-oau
// Mock jest and set the type
jest.mock("axios");
const mockedAxios = axios as jest.Mocked<typeof axios>;
const mockedAxios = jest.mocked(axios);
const apiUrl = "https://myapi.com";
const authUrl = "https://auth.myapi.com/oauth/token";
@ -19,7 +19,7 @@ const defaultGrantType = `grant_type=${defaultGrantValue}`;
describe("Get Access Token", () => {
beforeEach(() => {
// mockedAxios.request.mockReset();
mockedAxios.request.mockReset();
mockedAxios.request.mockResolvedValueOnce({ data: mockedAccessToken });
});
@ -109,7 +109,7 @@ describe("Get Access Token", () => {
describe("Request", () => {
beforeEach(() => {
// mockedAxios.request.mockReset();
mockedAxios.request.mockReset();
mockedAxios.request.mockResolvedValueOnce({ data: mockedAccessToken });
mockedAxios.request.mockResolvedValueOnce({ data: { status: "ok" } });
});