diff --git a/test/fixtures/cli/es6.js b/test/fixtures/cli/es6.js index 3d5285383..86c0c29ac 100644 --- a/test/fixtures/cli/es6.js +++ b/test/fixtures/cli/es6.js @@ -1,17 +1,23 @@ 'use strict' -let probe = () => { - let missed = () => { - console.log('do not hit') +class Yarsay { + constructor() { + console.log('sup') } -} -let b = () => { - console.log('hit this method') -} + hit() { + console.log('do not hit') + let miss = () => { + console.log('do not hit') + } + } -module.exports = () => { - console.log('do not hit') + miss() { + let miss = () => { + console.log('do not hit') + } + } } -b() +let y = new Yarsay() +y.hit() diff --git a/test/src/nyc-bin.js b/test/src/nyc-bin.js index 68428f859..de0d2d702 100644 --- a/test/src/nyc-bin.js +++ b/test/src/nyc-bin.js @@ -274,7 +274,7 @@ describe('the nyc cli', function () { describe('coverage', function () { if (parseInt(process.versions.node.split('.')[0]) < 4) return it('reports appropriate coverage information for es6 source files', function (done) { - var args = [bin, process.execPath, './es6.js'] + var args = [bin, '--reporter=lcov', '--reporter=text', process.execPath, './es6.js'] var proc = spawn(process.execPath, args, { cwd: fixturesCLI, @@ -289,7 +289,7 @@ describe('the nyc cli', function () { proc.on('close', function (code) { code.should.equal(0) // we should miss covering the appropriate lines. - stdout.should.match(/4,5,14/) + stdout.should.match(/11,16,17/) done() }) })