@@ -66,16 +66,19 @@ before_install:
66
66
# Configure eslint for linting
67
67
if node_version_lt '8.0'; then npm_remove_module_re '^eslint(-|$)'
68
68
fi
69
- - |
70
- # Configure istanbul for coverage
71
- if node_version_lt '0.10'; then npm_remove_module_re '^istanbul$'
72
- fi
73
69
- |
74
70
# Configure mocha for testing
75
71
if node_version_lt '0.10'; then npm_use_module 'mocha' '2.5.3'
76
72
elif node_version_lt '4.0' ; then npm_use_module 'mocha' '3.5.3'
77
73
elif node_version_lt '6.0' ; then npm_use_module 'mocha' '5.2.0'
78
74
fi
75
+ - |
76
+ # Configure nyc for coverage
77
+ if node_version_lt '0.10'; then npm_remove_module_re '^nyc$'
78
+ elif node_version_lt '4.0' ; then npm_use_module 'nyc' '10.3.2'
79
+ elif node_version_lt '6.0' ; then npm_use_module 'nyc' '11.9.0'
80
+ elif node_version_lt '8.0' ; then npm_use_module 'nyc' '14.1.1'
81
+ fi
79
82
- |
80
83
# Configure supertest for http calls
81
84
if node_version_lt '0.10'; then npm_use_module 'supertest' '1.1.0'
@@ -95,8 +98,8 @@ before_scrpt:
95
98
npm -s ls ||:
96
99
script :
97
100
- |
98
- # Run test script, depending on istanbul install
99
- if npm_module_installed 'istanbul '; then npm run-script test-travis
101
+ # Run test script, depending on nyc install
102
+ if npm_module_installed 'nyc '; then npm run-script test-travis
100
103
else npm test
101
104
fi
102
105
- |
@@ -105,8 +108,8 @@ script:
105
108
fi
106
109
after_script :
107
110
- |
108
- # Upload coverage to coveralls if exists
109
- if [[ -e ./coverage/lcov.info ]]; then
111
+ # Upload coverage to coveralls
112
+ if [[ -d .nyc_output ]]; then
110
113
npm install --save-dev coveralls@2
111
- coveralls < ./coverage/ lcov.info
114
+ nyc report --reporter=text- lcov | coveralls
112
115
fi
0 commit comments