Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit e3ec077

Browse files
author
Marlow Payne
committed
🚨 Add a test for singleItemOpen option
1 parent 8585d5c commit e3ec077

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/unit/plugin.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,20 @@ define([
282282
expect($openDisabledItem.hasClass('bellows--is-open')).to.be.true;
283283
});
284284
});
285+
286+
describe('a Bellows instance with singleItemOpen set', function() {
287+
it('only allows a single item open when opening another item', function() {
288+
$element.bellows({
289+
singleItemOpen: true,
290+
opened: function() {
291+
$element.bellows('open', 1);
292+
$element.find('.bellows__item.bellows--is-open').to.have.length(1);
293+
done();
294+
}
295+
});
296+
297+
$element.bellows('open', 0);
298+
});
299+
});
285300
});
286301
});

0 commit comments

Comments
 (0)