test: added supertest

This commit is contained in:
Riccardo
2023-08-04 21:41:44 +02:00
parent ed8b37c517
commit c913e5ecec
11 changed files with 14917 additions and 646 deletions

View File

@@ -0,0 +1,9 @@
import { addition } from './addition';
describe('call', () => {
it('returns the input value increased by one', async () => {
const response = addition(3);
expect(response).toBe(4);
});
});

8
src/utils/addition.ts Normal file
View File

@@ -0,0 +1,8 @@
/**
* Format a response message containing a user input.
* @param number - The user input value.
* @returns The value increased by one.
*/
export function addition(value: number) {
return value + 1;
}