Commit b0fa3aee authored by Robert Knight's avatar Robert Knight

Fix incorrect use of `assert.isEmpty()` in UI tests

`assert.isEmpty()` checks the size of an array, map or set or counts the
number of keys on an object. It doesn't know how to check that an Enzyme
wrapper produced no output. `assert.isEmpty(wrapper)` passes due to
implementation details of the Enzyme wrapper - it behaves like an object
with no properties. However it _always_ passes regardless of the number of
nodes in the wrapper, which is not the intended behavior here.
parent eb354982
......@@ -68,7 +68,7 @@ describe('AnnotationEditor', () => {
const wrapper = createComponent();
assert.isEmpty(wrapper);
assert.equal(wrapper.html(), '');
});
describe('markdown content editor', () => {
......
......@@ -84,7 +84,7 @@ describe('FilterStatus', () => {
context('(State 1): no search filters active', () => {
it('should return null if filter state indicates no active filters', () => {
const wrapper = createComponent();
assert.isEmpty(wrapper);
assert.equal(wrapper.children().length, 0);
});
});
......
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