diff --git a/examples/basic-math/src/arithmetic.js b/examples/basic-math/src/arithmetic.js index ae36902..9204bff 100644 --- a/examples/basic-math/src/arithmetic.js +++ b/examples/basic-math/src/arithmetic.js @@ -1,4 +1,6 @@ -export const add = () => {}; +export const add = (a, b) => { + return a + b; +}; export const subtract = () => {}; diff --git a/examples/basic-math/src/arithmetic.test.js b/examples/basic-math/src/arithmetic.test.js index a863ed7..b9689bb 100644 --- a/examples/basic-math/src/arithmetic.test.js +++ b/examples/basic-math/src/arithmetic.test.js @@ -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', () => {}); diff --git a/examples/scratchpad/index.js b/examples/scratchpad/index.js deleted file mode 100644 index 725147d..0000000 --- a/examples/scratchpad/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import { it, expect } from 'vitest'; - -it('is a super simple test', () => { - expect(true).toBe(true); -});