@@ -62,17 +62,20 @@ before_install:
62
62
# Configure eslint for linting
63
63
if node_version_lt '8.0'; then npm_remove_module_re '^eslint(-|$)'
64
64
fi
65
- - |
66
- # Configure istanbul for coverage
67
- if node_version_lt '0.10'; then npm_remove_module_re '^istanbul$'
68
- fi
69
65
- |
70
66
# Configure mocha for testing
71
67
if node_version_lt '0.10'; then npm_use_module 'mocha' '2.5.3'
72
68
elif node_version_lt '4.0' ; then npm_use_module 'mocha' '3.5.3'
73
69
elif node_version_lt '6.0' ; then npm_use_module 'mocha' '5.2.0'
74
70
elif node_version_lt '8.0' ; then npm_use_module 'mocha' '6.2.2'
75
71
fi
72
+ - |
73
+ # Configure nyc for coverage
74
+ if node_version_lt '0.10'; then npm_remove_module_re '^nyc$'
75
+ elif node_version_lt '4.0' ; then npm_use_module 'nyc' '10.3.2'
76
+ elif node_version_lt '6.0' ; then npm_use_module 'nyc' '11.9.0'
77
+ elif node_version_lt '8.0' ; then npm_use_module 'nyc' '14.1.1'
78
+ fi
76
79
- |
77
80
# Configure supertest for http calls
78
81
if node_version_lt '0.10'; then npm_use_module 'supertest' '1.1.0'
@@ -88,8 +91,8 @@ before_install:
88
91
fi
89
92
script :
90
93
- |
91
- # Run test script, depending on istanbul install
92
- if npm_module_installed 'istanbul '; then npm run-script test-travis
94
+ # Run test script, depending on nyc install
95
+ if npm_module_installed 'nyc '; then npm run-script test-ci
93
96
else npm test
94
97
fi
95
98
- |
@@ -99,7 +102,7 @@ script:
99
102
after_script :
100
103
- |
101
104
# Upload coverage to coveralls
102
- if [[ -f ./coverage/lcov.info ]]; then
105
+ if [[ -d .nyc_output ]]; then
103
106
npm install --save-dev coveralls@2
104
- coveralls < ./coverage/ lcov.info
107
+ nyc report --reporter=text- lcov | coveralls
105
108
fi
0 commit comments