Implement addition

This commit is contained in:
Steve Kinney
2024-10-02 10:28:38 -05:00
parent c1fe4faa03
commit 672d11c88b
3 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,6 @@
export const add = () => {}; export const add = (a, b) => {
return a + b;
};
export const subtract = () => {}; export const subtract = () => {};

View File

@@ -1,6 +1,11 @@
import { describe, it, expect } from 'vitest'; 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', () => {}); describe.todo('subtract', () => {});

View File

@@ -1,5 +0,0 @@
import { it, expect } from 'vitest';
it('is a super simple test', () => {
expect(true).toBe(true);
});