Assertions are the spoken/written language constructs made in the code. They look and function similar to how I've been speaking about them. In fact, most tests are structured in the same way we've been describing tests:
The first two points happen as we create objects and components and call their various methods. Assertions happen in the third point. Node.js ships with a few basic assertion methods, which we can use to write our first tests:
import assert from "assert"; assert( rendered.match(/<h1 data-reactid=".*">Home<\/h1>/g) );
There are quite a few assertion methods we can use:
assert.equal(actual, expected) ...