Refactored test logic to use karma-webpack-plugin

Signed-off-by: Simon Bailey <simon@newtriks.com>