Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
937 bytes
|
Line | |
---|
1 | var path = require('path')
|
---|
2 |
|
---|
3 | var createPattern = function (pattern) {
|
---|
4 | return { pattern: pattern, included: true, served: true, watched: false }
|
---|
5 | }
|
---|
6 |
|
---|
7 | var initJasmine = function (files) {
|
---|
8 | var jasminePath = path.dirname(require.resolve('jasmine-core'))
|
---|
9 | files.unshift(createPattern(path.join(__dirname, '/adapter.js')))
|
---|
10 | files.unshift(createPattern(path.join(__dirname, '/boot.js')))
|
---|
11 | files.unshift(createPattern(jasminePath + '/jasmine-core/jasmine.js'))
|
---|
12 | }
|
---|
13 |
|
---|
14 | initJasmine.$inject = ['config.files']
|
---|
15 |
|
---|
16 | function InjectKarmaJasmineReporter (singleRun) {
|
---|
17 | return {
|
---|
18 | onSpecComplete (browser, karmaResult) {
|
---|
19 | if (!singleRun && karmaResult.debug_url) {
|
---|
20 | console.log('Debug this test: ' + karmaResult.debug_url)
|
---|
21 | }
|
---|
22 | }
|
---|
23 | }
|
---|
24 | }
|
---|
25 |
|
---|
26 | InjectKarmaJasmineReporter.$inject = ['config.singleRun']
|
---|
27 |
|
---|
28 | module.exports = {
|
---|
29 | 'framework:jasmine': ['factory', initJasmine],
|
---|
30 | 'reporter:karma-jasmine': ['factory', InjectKarmaJasmineReporter]
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.