Basically what's in the title. I have the following code in a component I am writing a test for:
<Button>Edit</Button> // <- Material UI Button component
And this line in my test is failing:
expect(wrapper.find(Button).text()).to.equal("Edit");
with this error:
assert.strictEqual(received, expected)
Expected value to strictly be equal to:
"Edit"
Received:
"<Button />"
Message:
expected '<Button />' to equal 'Edit'
Any idea what might be happening?