Coding task · JavaScript and TypeScript course · Module 11: Testing with Jest
Use beforeEach so that each test has a fresh data state.
Write tests for a fence system with beforeEach ensuring a clean state.