grunt-mocha-istanbul icon indicating copy to clipboard operation
grunt-mocha-istanbul copied to clipboard

Using this with flow

Open simlu opened this issue 6 years ago • 3 comments

I've tried to configure this to run with flow and somehow it doesn't work.

Anyone had success with this? I'm basically following the instructions for Running ES2015+ tests with ES2015+ sources (through Babel-CLI), but using flow instead. It should work?

simlu avatar Mar 30 '18 02:03 simlu

Basic Steps: installing

    "babel-cli": "6.26.0",
    "babel-preset-flow": "6.23.0",
    "babel-register": "6.26.0",
    "istanbul": "1.0.0-alpha.2",

Adding options nodeExec: require.resolve('.bin/babel-node'), and mochaOptions: ['--require', 'babel-register', ...

and .babelrc

{
  "presets": ["flow"]
}

Somehow the coverage doesn't get picked up correctly It seems.

simlu avatar Mar 30 '18 02:03 simlu

hello @simlu, from a ease-of-use perspective, I'd recommend against using this grunt plugin in new projects and using something more up-to-date. for example, a combination of ava and nyc (or even nyc and mocha) is as simple as nyc ava or nyc mocha

pocesar avatar Mar 30 '18 04:03 pocesar

@pocesar That's what I'm doing now. Maybe also time to abandon grunt all together.... Thanks for the reply!

simlu avatar Mar 30 '18 04:03 simlu