Back to Freecodecamp

Task 30

curriculum/challenges/english/blocks/learn-about-speculation-and-requests/67eeb3225f71b22c54c19018.md

latest1.9 KB
Original Source
<!-- (audio) Sophie: It would have caught the error early on and saved you some time. -->

--instructions--

Listen to the audio and answer the question below.

--questions--

--text--

Why is it important to run a test suite?

--answers--

It slows down the coding process.

--feedback--

Running tests might take some time, but it prevents bigger issues later.


It helps find errors before they cause bigger problems.


It makes the code shorter.

--feedback--

A test suite does not change the length of the code.


It removes all bugs from the code.

--feedback--

Tests help find bugs, but they don't guarantee a program is perfect.

--video-solution--

2

--explanation--

To understand the correct answer, listen to what Sophie says: It would have caught the error early on and saved you some time.

She uses the phrase would have caught, which shows that Mark could have found the error earlier, but this didn’t happen. Here's another example:

If you had run the test suite, it would have found the missing bracket. - This means running a test suite helps you find issues early and avoid wasting time later.

--scene--

json
{
  "setup": {
    "background": "company2-center.png",
    "characters": [
      {
        "character": "Sophie",
        "position": {
          "x": 50,
          "y": 0,
          "z": 1.4
        },
        "opacity": 0
      }
    ],
    "audio": {
      "filename": "B1_17-1.mp3",
      "startTime": 1,
      "startTimestamp": 46.26,
      "finishTimestamp": 49.32
    }
  },
  "commands": [
    {
      "character": "Sophie",
      "opacity": 1,
      "startTime": 0
    },
    {
      "character": "Sophie",
      "startTime": 1,
      "finishTime": 4.06,
      "dialogue": {
        "text": "It would have caught the error early on and saved you some time.",
        "align": "center"
      }
    },
    {
      "character": "Sophie",
      "opacity": 0,
      "startTime": 4.56
    }
  ]
}