Testing & QA Code Reorder Medium +20 XP
Given-When-Then
Arrange the BDD-style test structure.
Click lines in the correct order
Available lines4 left
Your order
Click lines above to build your solution.
Show answer and explanation
Answer: describe('Cart', () => {
// Given: set up the context
// When: perform the action
// Then: verify the outcome
});
BDD: Given (setup), When (action), Then (assertion). Mirrors Arrange-Act-Assert.
Hint: Given sets up, When acts, Then asserts.
What this challenge tests
Code Reorder in Testing & QA: bdd, patterns.