add unit test for collapse.js