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

Running "jest --coverage" throws an error when the Parser contains 'formatter' #132

Open
hulinNeil opened this issue Dec 9, 2019 · 2 comments

Comments

@hulinNeil
Copy link

Running "jest --coverage" throws an error when the Parser contains 'formatter'

image

image

@parkerleblanc01
Copy link

I am seeing the same error without using formatter, but still using array. Perhaps the issue stems from the Parser contains 'array'

@cmdcolin
Copy link
Contributor

cmdcolin commented Jan 3, 2023

can use istanbul ignore, has to do with eval and such

parser: new Parser()
    .uint8('compressionMethod', {
      formatter: /* istanbul ignore next */ b => {
        const method = [
          'raw',
          'gzip',
          'bzip2',
          'lzma',
          'rans',
          'rans4x16',
          'arith',
          'fqzcomp',
          'tok3',
        ][b]
        if (!method) {
          throw new Error(`compression method number ${b} not implemented`)
        }
        return method
      },
    })

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

No branches or pull requests

3 participants