Added test/common.js.
Refactored test/addPlugin.js to use test/common.js.
Revamped test/common.js.
Added test test/addPlugin.js to check created plugin works.
Added after() hook to clean up memory allocated to JSDOM.