add tests for plugin.js