Update some of the exercises

This commit is contained in:
Steve Kinney
2024-09-16 13:13:38 -06:00
parent a028678660
commit 1747f705a6
15 changed files with 1617 additions and 597 deletions

View File

@@ -0,0 +1,21 @@
import { expect, it, describe } from 'vitest';
import { counter } from './counter';
// For added fun, we can try `describe.shuffle`.
describe.todo('Counter', () => {
it('starts at zero', () => {
expect(counter.value).toBe(0);
});
it('can increment', () => {
counter.increment();
expect(counter.value).toBe(1);
});
// Let's get this test to *not* fail.
it('can decrement', () => {
counter.increment();
counter.decrement();
expect(counter.value).toBe(0);
});
});