Git Product home page Git Product logo

Comments (6)

glenjamin avatar glenjamin commented on September 25, 2024

I've never seen that error before, do you know which module is producing it?

Can you get a stack trace, or grep for the phrases in your node_modules folder?

from mocha-multi.

bloatedsack avatar bloatedsack commented on September 25, 2024

Here's the line that's throwing:
https://github.com/angular/protractor/blob/2.5.1/lib/cli.js#L68

And here's the string it's launcing with (I added some endlines so we can read it here):

Spawn node with arguments: node_modules/grunt-protractor-runner/node_modules/protractor/bin/protractor node_modules/testcore/src/conf/protractor.conf.js 
--seleniumAddress http://localhost:4444/wd/hub --baseUrl https://blahblah.com/ --browser chrome 
--specs workspace/tests/test/e2e/stories/**/*.js 
--verbose 
--mochaOpts.ui bdd 
--mochaOpts.reporter mocha-multi 
--mochaOpts.timeout 540000 
--mochaOpts.reporterOptions.xunit.stdout build-artifacts/reporters/results.xml 
--mochaOpts.reporterOptions.json.stdout build-artifacts/reporters/json-reporter.json 
--mochaOpts.reporterOptions.spec -

It seems to be that last -

So, here's how I fixed it spec: '"-"'
/shrug :shipit: ?

from mocha-multi.

bloatedsack avatar bloatedsack commented on September 25, 2024

Nope, take it back. That didn't fix it. It creates a file named "-" and directs spec stdout to it.

from mocha-multi.

glenjamin avatar glenjamin commented on September 25, 2024

Ah, so the problem is that something in the chain is doing an incorrect transformation of those options.

I don't know how protractor expands those arguments, so you'd have to look into how that happens. Perhaps doing arg=val for each one will stop the - getting lost.

from mocha-multi.

bloatedsack avatar bloatedsack commented on September 25, 2024

I'm not sure what you mean about setting arg=val.

The version of protractor I'm on (2.5) uses the now deprecated optimist for arg parsing. It's also going through the grunt layer, so who knows that's doing to the args as well.

After tinkering with a few more string manipulations I ended up working around it by driving it through the env var.

    process.env.multi = 'spec=- ' 
        + 'xunit=build-artifacts/reporters/results.xml '
        + 'json=build-artifacts/reporters/json-reporter.json';

from mocha-multi.

glenjamin avatar glenjamin commented on September 25, 2024

it might have worked using --mochaOpts.reporterOptions.spec=-, but I forgot you don't get control over how that command string gets created.

Environment variable won't be going away, so should be pretty reliable.

from mocha-multi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.