unit tests for destroy.js