Angular · Senior · Question 46 of 75

What are component harnesses for?

Explanation

const button = await loader.getHarness(MatButtonHarness) keeps tests working when the internal markup changes. Angular Material ships harnesses, and you can write your own with the CDK.

Further reading

Problem with a question

Angular · Senior · question 46

Test yourself

Take the Angular · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz