source: trip-planner-front/node_modules/karma-jasmine/lib/index.js@ 6fe77af

Last change on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 937 bytes
Line 
1var path = require('path')
2
3var createPattern = function (pattern) {
4 return { pattern: pattern, included: true, served: true, watched: false }
5}
6
7var 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
14initJasmine.$inject = ['config.files']
15
16function 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
26InjectKarmaJasmineReporter.$inject = ['config.singleRun']
27
28module.exports = {
29 'framework:jasmine': ['factory', initJasmine],
30 'reporter:karma-jasmine': ['factory', InjectKarmaJasmineReporter]
31}
Note: See TracBrowser for help on using the repository browser.