Skip to main content
Testing & QA Code Completion Easy +10 XP

Jest Assertion

Complete the assertion to check the value.

Testing & QAFill in the blank
expect(add(2, 3)).___( 5);

Type the missing code

Show answer and explanation

Answer: toBe

toBe() uses Object.is() to check strict equality, perfect for primitive values like numbers and strings.

Hint: Which matcher checks strict equality?

What this challenge tests

Code Completion in Testing & QA: jest, assertions.

Related challenges