forked from angular-ui/angular-google-maps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjasmineSettings.coffee
56 lines (46 loc) · 1.58 KB
/
jasmineSettings.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
_ = require('lodash')
log = require('util').log
doCover = true #clean cheap way to disable coverage so you can debug the darn code.. thank you blanket
requireConfig =
paths:
"lodash": "bower_components/lodash/dist/lodash.underscore"
deps: ["lodash"]
callback: (_) ->
log("jasmineSettings: past requireConfig")
spec =
src: ["bower_components/lodash-amd/main.js", "dist/angular-google-maps.js"]
options:
keepRunner: true
vendor: ["http://maps.googleapis.com/maps/api/js?sensor=false&language=en",
"bower_components/jquery/jquery.js",
"bower_components/angular/angular.js",
"bower_components/angular-mocks/angular-mocks.js"]
specs: ["tmp/spec/js/bootstrap.js", "tmp/spec/js/**/*spec.js"]
helpers: ["tmp/spec/js/helpers/helpers.js"]
template: require "grunt-template-jasmine-requirejs"
templateOptions:
requireConfig: requireConfig
log("jasmineSettings: past spec")
coverage = undefined
if doCover
coverage = _.clone spec
coverage.options = _.extend coverage.options,
template: require "grunt-template-jasmine-istanbul"
templateOptions:
template: require "grunt-template-jasmine-requirejs"
templateOptions:
requireConfig:
requireConfig
coverage: "spec/coverage/coverage.json"
report: "spec/coverage"
thresholds:
lines: 25
statements: 25
branches: 5
functions: 25
log("jasmineSettings: past coverage")
toExport =
spec: spec
toExport["coverage"] = coverage if coverage
log("jasmineSettings: past toExport")
module.exports = toExport