Skip to content

Commit f94b356

Browse files
committed
refactor: update client creation method and improve error message in tests
1 parent ee0dd99 commit f94b356

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/app/app.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { createBrexClient, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT } from '../../src/app';
1+
import { createBrex, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT } from '../../src/app';
22

33
import { describe, it, expect } from 'vitest';
44

55
const baseURL = 'https://jsonplaceholder.typicode.com/';
66

77
describe('Base app HTTP Client', () => {
88
it('should create a Brex client with default config', async () => {
9-
const client = createBrexClient({ baseURL });
9+
const client = createBrex({ baseURL });
1010

1111
const response = await client.request({
1212
method: 'GET',
@@ -106,7 +106,7 @@ describe('Base app HTTP Client', () => {
106106
});
107107

108108
it('should handle request with timeout', async () => {
109-
const client = createBrexClient({ baseURL, timeout: 1000 });
109+
const client = createBrex({ baseURL, timeout: 1000 });
110110

111111
const response = await client.request({
112112
method: 'GET',

tests/helpers/helpers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('Helpers', () => {
6767
const httpError = createHttpError(null, 500);
6868

6969
expect(httpError).toEqual({
70-
message: 'Unknown error',
70+
message: 'Internal Server Error',
7171
status: 500,
7272
code: HttpCode[500],
7373
});

0 commit comments

Comments
 (0)