Commit d0001eaf authored by Robert Knight's avatar Robert Knight

Fix incorrect use of `hasClass` in `Button` test

The Enzyme `hasClass` method was being called on a non-DOM node by
mistake. This didn't cause any problems, but it just meant that the test
was not checking what it intended to check.
parent a5f1b9f8
...@@ -127,8 +127,8 @@ describe('Button', () => { ...@@ -127,8 +127,8 @@ describe('Button', () => {
const wrapper = createComponent({ className: 'my-class' }); const wrapper = createComponent({ className: 'my-class' });
assert.isTrue(wrapper.find('button').hasClass('my-class')); assert.isTrue(wrapper.find('button').hasClass('my-class'));
assert.isFalse(wrapper.hasClass('button--icon-only')); assert.isFalse(wrapper.find('button').hasClass('button--icon-only'));
assert.isFalse(wrapper.hasClass('button--labeled')); assert.isFalse(wrapper.find('button').hasClass('button--labeled'));
}); });
it('disables the button when `disabled` prop is true', () => { it('disables the button when `disabled` prop is true', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment