1 | var JASMINE_CORE_PATTERN = /([\\/]karma-jasmine[\\/])/i;
|
2 | var createPattern = function (path) {
|
3 | return { pattern: path, included: true, served: true, watched: false };
|
4 | };
|
5 |
|
6 | var initReporter = function (files, baseReporterDecorator) {
|
7 | var jasmineCoreIndex = 0;
|
8 |
|
9 | baseReporterDecorator(this);
|
10 |
|
11 | files.forEach(function (file, index) {
|
12 | if (JASMINE_CORE_PATTERN.test(file.pattern)) {
|
13 | jasmineCoreIndex = index;
|
14 | }
|
15 | });
|
16 |
|
17 | files.splice(++jasmineCoreIndex, 0, createPattern(__dirname + '/css/jasmine.css'));
|
18 | files.splice(++jasmineCoreIndex, 0, createPattern(__dirname + '/lib/html.jasmine.reporter.js'));
|
19 | files.splice(++jasmineCoreIndex, 0, createPattern(__dirname + '/lib/adapter.js'));
|
20 | };
|
21 |
|
22 | initReporter.$inject = ['config.files', 'baseReporterDecorator'];
|
23 |
|
24 | module.exports = {
|
25 | 'reporter:kjhtml': ['type', initReporter]
|
26 | };
|