Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow rows with 100% statement, branch, and function coverage to be skipped in text report #859

Merged
merged 3 commits into from
Jun 8, 2018

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Jun 6, 2018

@chrismohr ☝️ I note that for skipEmpty we actually support both text and HTML reports; might be a good next contribution for you?

CC: @coreyfarrell for review.

@bcoe bcoe requested a review from coreyfarrell June 6, 2018 21:51
@coreyfarrell
Copy link
Member

@bcoe would be nice to add a test verifying that --skip-full doesn't skip sources that aren't fully covered. Otherwise this looks good to me.

    it('does displays files without 100% statement, branch, and function coverage', (done) => {
      const args = [
        bin,
        '--skip-full',
        process.execPath, './instrumented/s1.min.js'
      ]

      const proc = spawn(process.execPath, args, {
        cwd: fixturesSourceMaps,
        env: env
      })

      var stdout = ''
      proc.stdout.on('data', function (chunk) {
        stdout += chunk
      })

      proc.on('close', function (code) {
        code.should.equal(0)
        stdoutShouldEqual(stdout, `
        ----------|----------|----------|----------|----------|-------------------|
        File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
        ----------|----------|----------|----------|----------|-------------------|
        All files |       80 |      100 |       50 |       80 |                   |
         s1.js    |       80 |      100 |       50 |       80 |                 7 |
        ----------|----------|----------|----------|----------|-------------------|`)
        done()
      })
    })

@bcoe bcoe merged commit 893345a into master Jun 8, 2018
@bcoe bcoe deleted the skip-full branch June 8, 2018 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants