Skip to content

Commit

Permalink
fix: Don't ignore src/visitor.js for self test. (#194)
Browse files Browse the repository at this point in the history
src/visitor.js contains the logic to skip files containing comments
matching 'istanbul ignore file'.  Unfortunately the comment for the
patter contained this exact word, blocking coverage from our own test.
Rewrite the comment so the file is not ignored.
  • Loading branch information
coreyfarrell authored and JaKXz committed Jun 28, 2018
1 parent f461b7e commit 71b815d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/istanbul-lib-instrument/src/visitor.js
Expand Up @@ -3,9 +3,9 @@ import { SHA, MAGIC_KEY, MAGIC_VALUE } from './constants';
import {createHash} from 'crypto';
import template from '@babel/template';

// istanbul ignore comment pattern
// pattern for istanbul to ignore a section
const COMMENT_RE = /^\s*istanbul\s+ignore\s+(if|else|next)(?=\W|$)/;
// istanbul ignore file pattern
// pattern for istanbul to ignore the whole file
const COMMENT_FILE_RE = /^\s*istanbul\s+ignore\s+(file)(?=\W|$)/;
// source map URL pattern
const SOURCE_MAP_RE = /[#@]\s*sourceMappingURL=(.*)\s*$/m;
Expand Down

0 comments on commit 71b815d

Please sign in to comment.