diff --git a/README.md b/README.md
index 0f8b77c..05b88fa 100644
--- a/README.md
+++ b/README.md
@@ -174,6 +174,12 @@ If `accordion` is true, only one panel can be open. Opening another panel will
{
}, 500);
});
});
+
+ describe('forceRender', () => {
+ let node;
+ let collapse;
+
+ beforeEach(() => {
+ node = document.createElement('div');
+ document.body.appendChild(node);
+ });
+
+ const renderCollapse = (element) => {
+ ReactDOM.render(element, node, function init() {
+ collapse = this;
+ });
+ };
+
+ afterEach(() => {
+ ReactDOM.unmountComponentAtNode(node);
+ changeHook = null;
+ });
+
+ it('when forceRender is not supplied it should lazy render the panel content', () => {
+ renderCollapse(
+
+ first
+ second
+
+ );
+ expect(findDOMNode(collapse, 'rc-collapse-content').length).to.be(0);
+ });
+
+ it('when forceRender is FALSE it should lazy render the panel content', () => {
+ renderCollapse(
+
+ first
+ second
+
+ );
+ expect(findDOMNode(collapse, 'rc-collapse-content').length).to.be(0);
+ });
+
+ it('when forceRender is TRUE then it should render all the panel content to the DOM', () => {
+ renderCollapse(
+
+ first
+ second
+
+ );
+ expect(findDOMNode(collapse, 'rc-collapse-content').length).to.be(1);
+ expect(findDOMNode(collapse, 'rc-collapse-content-active').length).to.be(0);
+ });
+ });
});