They are shown when you run the tests. Until then they appear as a hidden requirement.
Build a text box that counts characters and warns when a limit is passed. You practice controlled inputs and values derived from state.
textarea, the counter and the warning.N/50 format, the text Limit exceeded and the roles: the tests use them.N/50 inside the element with role="status" and at the start it is 0/50.Limit exceeded appears in an element with role="alert".0/50.test → you see 4/50 and no warning.60/50 and the warning Limit exceeded.Make the textarea controlled: store its text in useState and pass it as value.
The count does not need its own state: it comes from text.length on every render.
The same goes for the warning: it is a condition on that length.
value + onChange).The console is empty
Run your code with Ctrl+S
This console starts empty every time the preview loads. The browser's DevTools console keeps the messages with Preserve log.