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
    that’s really weird
    what version of node/OS are you using?
    Ben Cessa
    @bcessa
    node is v0.10.28 and OS is Mac OS 10.9.3
    Pedro Tacla Yamada
    @yamadapc
    heh
    apart from me being on 10.9.2, everything is the same on our envs
    I’m actually pretty sure the reporter works, cause I’ve ran it on CI systems already
    but I want to figure out why it isn’t working for you
    Ben Cessa
    @bcessa
    the relevant portion on my package.json file is this http://pastebin.com/8GYbagh4
    Pedro Tacla Yamada
    @yamadapc
    okay
    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 :)