Module 10 · Check it yourself · challenge 2 of 3 in this lesson

A saveProfile function takes the store as an argument

You compare your work with the list of what done means.

Open

Level 2, Builder

Challenge

Write a save function and two mocked tests for it, one for success and one for failure.

Start from
The game at milestone m06 (download)

Done means

  • A saveProfile function takes the store as an argument
  • One test passes a mock that succeeds and checks it was called once
  • One test passes a mock that throws and checks the function returns false after retrying

Meet the criteria above, then record your own result. No test grades this check.