An assertion library supplies questions whose answers should be true. In browser testing, Chai lets you express expectations such as `assert.equal(1 + 2, 3)` and compare function results. section 13.2
Assertions form the checking layer alongside Mocha’s test suites and Selenium’s browser automation. Instead of hardcoding both sides, compare component state, attributes, calculated styles, or function results. section 13.2
Testing a slider component
A slider test can assert its initial value, reflected attribute, and thumb position: `assert.equal(slider.value, 50)`. Further assertions verify JavaScript updates and clamp values such as 110 and −10 to configured bounds.
