Implement addition
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
export const add = () => {};
|
||||
export const add = (a, b) => {
|
||||
return a + b;
|
||||
};
|
||||
|
||||
export const subtract = () => {};
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { add } from './arithmetic.js';
|
||||
|
||||
describe.todo('add', () => {});
|
||||
describe('add', () => {
|
||||
it('should add two positive numbers', () => {
|
||||
expect(add(2, 2)).toBe(4);
|
||||
});
|
||||
});
|
||||
|
||||
describe.todo('subtract', () => {});
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import { it, expect } from 'vitest';
|
||||
|
||||
it('is a super simple test', () => {
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
Reference in New Issue
Block a user