Why is automated testing important? Select all that apply.
It reduces human error.
It offers a faster feedback cycle, bringing faster validation and helping the development team to detect problems or bugs early.
It saves time to development teams.
What are some of the best practices when writing your automated tests? Select all that apply
They should resemble the way your software is used.
They should be maintainable in the long run.
Your tests need to be focused on the implementation details of your components.
Imagine you have a component that renders both an
input
tag and alabel
tag with the exact textComments
:. Inside your test, you have the below piece of code:const element = screen.getByLabelText(/Comments:/);
The label element
The input element
The document object
In a particular test that’s been written for a form component, you encounter the below two lines of code. What kind of data would the
handleSubmit
variable represent?const handleSubmit = jest.fn(); render(<FeedbackForm onSubmit={handleSubmit} />);
A copy of the real function that’s used in the parent component that renders the FeedbackForm.
A mock function to track how is called by external code and thus explore the arguments passed in.
A specific function jest provides to handle form submissions
What are some of the benefits of Continuous Integration (CI)? Select all that apply.
Find bugs earlier and fix them faster.
Improved developer productivity.
Faster manual integrations.
Deliver working software more often.