Skip to content

Commit

Permalink
removed dummy tests and added test in server
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharvari Deshmukh authored and Sharvari Deshmukh committed Mar 10, 2024
1 parent b8aaefb commit 13900eb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
3 changes: 0 additions & 3 deletions client/test/dummy.test.js

This file was deleted.

19 changes: 19 additions & 0 deletions server/test/app/utils/apiError.test.js
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);
});
});
5 changes: 0 additions & 5 deletions server/test/dummy.test.js

This file was deleted.

0 comments on commit 13900eb

Please sign in to comment.