unit tests for collapse.js