Review before applying
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
Covered code still needs a meaningful check. CoverScope helps you read an existing coverage report alongside the assertions and behaviors behind it.
test('rejects a duplicate key', () => {
expect(() => insertExistingKey())
.toThrow(DuplicateKeyError);
});Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
Base URL, credentials and a reachable server.
Find a branch that runs without checking its result, then add a test that would fail when the behavior is wrong.
test('rejects a duplicate key', () => {
expect(() => insertExistingKey())
.toThrow(DuplicateKeyError);
});