Skip to content

Mistake: Multiple Assertions

Find the Mistake Medium
workbench

Question

What is wrong with this test?

Code

                  test('everything works', () => {
  expect(add(1, 1)).toBe(2);
  expect(subtract(5, 3)).toBe(2);
  expect(multiply(2, 3)).toBe(6);
  expect(divide(10, 2)).toBe(5);
});
                

Related Resources

Related Lessons

Look up unfamiliar terms

A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.

View glossary

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

Build real projects

Apply what you learned by building guided projects with starter code and solutions.

View projects

← Back to topic