Skip to content

Commit

Permalink
Istanbul-ignore directive for uncoverable code-line
Browse files Browse the repository at this point in the history
  • Loading branch information
nknapp committed Apr 1, 2016
1 parent cf973e1 commit 5e446f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ var defaultMagic = null
try {
defaultMagic = require.resolve('stream-mmmagic/node_modules/mmmagic/magic/magic.mgc')
} catch (e) {
/* istanbul ignore else */
if (e.code === 'MODULE_NOT_FOUND') {
// npm-version >= 3
defaultMagic = require.resolve('mmmagic/magic/magic.mgc')
} else {
// else-block ignored in test coverage report. It exist to be save, in case
// the `require.resolve` throws an error other tham MODULE_NOT_FOUND.
throw e
}
}
Expand Down

0 comments on commit 5e446f4

Please sign in to comment.