-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed dummy tests and added test in server
- Loading branch information
Sharvari Deshmukh
authored and
Sharvari Deshmukh
committed
Mar 10, 2024
1 parent
b8aaefb
commit 13900eb
Showing
3 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const ApiError = require('../../../src/app/utils/apiError'); | ||
|
||
describe('ApiError', () => { | ||
test('should create an instance of ApiError with the provided status code and message', () => { | ||
const statusCode = 404; | ||
const message = 'Not Found'; | ||
const apiError = new ApiError(statusCode, message); | ||
|
||
expect(apiError).toBeInstanceOf(ApiError); | ||
expect(apiError.statusCode).toBe(statusCode); | ||
expect(apiError.message).toBe(message); | ||
}); | ||
|
||
test('should inherit from Error class', () => { | ||
const apiError = new ApiError(500, 'Internal Server Error'); | ||
|
||
expect(apiError).toBeInstanceOf(Error); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.