Documentation Feedback
I just noticed an error in your button-harness-example.spec.ts
In line 11 it has the following assignment
let buttonHarness = MatButtonHarness;
which was meant to be a declaration
let buttonHarness: MatButtonHarness;
But it turns out the buttonHarness variable is never assigned. The usages of that variable later on in the it() functions will also not work. The variable is not needed at all!
The it() blocks can just use MatButtonHarness.with() directly.
The following changes to that spec file should be made
- remove the
let buttonHarness = MatButtonHarness; assignment in line 11
- adjust the usages of the buttonHarness variables in the second and third
it() function. from buttonHarness.with() to MatButtonHarness.with()
Affected documentation page
https://material.angular.io/components/button/examples#button-harness
Documentation Feedback
I just noticed an error in your
button-harness-example.spec.tsIn line 11 it has the following assignment
which was meant to be a declaration
But it turns out the
buttonHarnessvariable is never assigned. The usages of that variable later on in theit()functions will also not work. The variable is not needed at all!The
it()blocks can just useMatButtonHarness.with()directly.The following changes to that spec file should be made
let buttonHarness = MatButtonHarness;assignment in line 11it()function. frombuttonHarness.with()toMatButtonHarness.with()Affected documentation page
https://material.angular.io/components/button/examples#button-harness