by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Pedro Tacla Yamada
    @yamadapc
    mm...
    this works for me
    I can’t really get it…
    give me a sec
    Ben Cessa
    @bcessa
    sure, thnx
    Pedro Tacla Yamada
    @yamadapc
    what happens if you try to run require(‘mocha-spec-cov-alt’) ?
    (in a repl)
    Ben Cessa
    @bcessa
    checking
    require( 'mocha-spec-cov-alt' );
    { [Function: SpecCov]
    super_: [Function: Spec],
    coverage: [Function: coverage],
    readPkgJson: [Function: readPkgJson] }
    seems to be working fine
    Pedro Tacla Yamada
    @yamadapc
    well
    try running:
    Mocha = require(‘mocha’)
    ```javascript
    `mocha = new Mocha({ reporter: ‘mocha-spec-cov-alt’ })
    or
    try running:
    ./node_modules/mocha -R mocha-spec-cov-alt —require blanket
    Ben Cessa
    @bcessa
    running it like this works like a charm
    ./node_modules/mocha/bin/mocha -R mocha-spec-cov-alt --require blanket
    Pedro Tacla Yamada
    @yamadapc
    ops
    yeah
    that’s what I meant
    ./node_modules/.bin/mocha
    well
    here’s the thing
    you can either install the reporter globally, which should work for your local mocha script
    or, since you’re using grunt it should already work with the local one
    (you’re running a globally installed mocha, which is different from the local one)
    or
    if you run the command directly from a test script in your package.json, npm will figure out automatically it should use the local version
    it’s funny, because I probably have some weird config in my machine to always use local executables
    I think I did something like
    Ben Cessa
    @bcessa
    I see; and yes, now that I manage to get it running I intent to integrate it as a grunt task too; let me try initialling the reporter globally and check it out that way
    Pedro Tacla Yamada
    @yamadapc
    but hey
    here’s a better approach, which I think I did indirectly on some of my dot files:
    export PATH=“./node_modules/.bin:$PATH"
    I had forgotten about this
    This is good practice, because you’re using the project's executables
    (in favor of your own)
    Ben Cessa
    @bcessa
    hey that's a great tip :D thnx a lot man
    by the way, the reporter is gorgeous :)
    Pedro Tacla Yamada
    @yamadapc
    no problem
    :3
    thanks
    I mainly just copied from the spec reporter
    the nice thing actually is it inherits from it, and could inherit from any other reporter… so I could actually support all of them
    but… yeah
    problem solved then
    Ben Cessa
    @bcessa
    yes, I just comment and close the issue ;) seriously, thanks a lot for your assistance, have a good day
    Pedro Tacla Yamada
    @yamadapc
    you too; thanks