This karma plugin is useful when you switching to karma and don't want to rewrite all your tests because karma don't provide a automatically HTML page injection for your tests.
You can inject markup from a file or you can write the markup directly into the karma config.
$ npm install karma-inject-html
injectHtml (options object)
you can set either a file or the raw markup
(relative to the
options.raw: '<div id="test-content"><div>'
What is with karma-html2js-preprocessor?
There is alread a plugin which converts HTML files into JS strings, but it only provides
them via the global
So you still need to load your markup in every test.
How it works?
before each test starts.