lecture 7 of 180 completed

Choose data that exposes a bug

Two tests pass with the same input. Give each case a value that can expose the mistake.

What you'll learn

  • Find the input a passing test actually uses.
  • Give each input its own named test.
  • Explain which input exposes the mistake.

assert.strictEqual(link.searchParams.get('find'), 'paper') passes. The test is called “shares words joined by &”.

You copy a search for ink & paper from a reading list. Someone opens your link. Their search has lost the word paper.

Here is the feature and its tests. The reading list is invented. The example builds an address without opening a website.

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →