feat: modify test

pull/2/head
crazywoola 3 years ago
parent 9ccaaa04c3
commit 68176a3734

@ -1,4 +1,4 @@
import { LangGeniusClient, BASE_URL } from ".."; import { LangGeniusClient, BASE_URL, routes } from "..";
import axios from 'axios' import axios from 'axios'
@ -20,7 +20,7 @@ describe('Client', () => {
}) })
}); });
describe('sendRequest', () => { describe('Send Requests', () => {
let langGeniusClient let langGeniusClient
beforeEach(() => { beforeEach(() => {
@ -31,9 +31,9 @@ describe('sendRequest', () => {
jest.resetAllMocks() jest.resetAllMocks()
}) })
it('should make a successful request to the API', async () => { it('should make a successful request to the application parameter', async () => {
const method = 'GET' const method = 'GET'
const endpoint = '/test-endpoint' const endpoint = routes.application.url
const expectedResponse = { data: 'response' } const expectedResponse = { data: 'response' }
axios.mockResolvedValue(expectedResponse) axios.mockResolvedValue(expectedResponse)

Loading…
Cancel
Save