There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
Hi colleagues about the chapter of “Automate and organise tests” exactly in the lesson of Teardown i don’t know the utilities exactly of doing a teardown in test because at the test when he added a file in the directory and in the end of the test he deleted using the Teardown tool.
Hi there, having issue understanding step 2
" we are modifying the environment by creating a new message.txt file. However, the current tests do not have a teardown phase. The test fails because the second test appends an empty string to the file created from the first test instead of creating a new file with just an empty string."
I thought that the second test will add an empty string into the message.txt file which was created by the first test and will be able to pass. I don’t understand why the second test failed even after reading the explanation.
So from my understanding, first test created message.txt and add the string ‘Hello Node.js’
Second test, will find the existed file message.txt and add an empty string after the “Hello Node js”
(" * fs.appendFileSync(path, str) creates a new file at path with the string str as content. If a file at path exists, the string str will be appended to the end.")