8283e05c02
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
12 lines
349 B
TypeScript
12 lines
349 B
TypeScript
import { expect, test } from "bun:test";
|
|
import { RequestError } from "../src/error";
|
|
|
|
test("request error", () => {
|
|
const expectedMsg = "This is my err";
|
|
const expectedStatusCode = 500;
|
|
|
|
const err = new RequestError(expectedMsg, expectedStatusCode);
|
|
|
|
expect(err.message).toBe(expectedMsg);
|
|
expect(err.statusCode).toBe(expectedStatusCode);
|
|
});
|