add unit tests for plugin.js