Report on every path
A missing banner needs a test result of its own.
your task
Print one result per case. Keep the existing results for visible banners. For a missing banner, print “fail: no banner”.
The check reports the text of a booking banner. When the banner is missing, banner is null and the check prints nothing.
Run code runs your code once for each case. It compares what your code prints with the expected output.
Starter code
or press Ctrl EnterNot run yet
cases
Not run yetThe banner says Booking saved
Expected output
1
passSee the input and the code for this case
const banner = "Booking saved";
Not run yetThe banner shows an error
Expected output
1
fail: banner says Room is fullSee the input and the code for this case
const banner = "Room is full";
Not run yetThere is no banner
Expected output
1
fail: no bannerSee the input and the code for this case
const banner = null;