tape-testing/testling

testling + centos + phantomjs getting error: No headless browser found

Closed this issue · 3 comments

I'm having a difficult time getting my setup to work, although everything seems to be in order. I have PhantomJS installed:

-bash-4.1$ node node_modules/testling/node_modules/browser-launcher/example/detect.js
# available browsers:
[ { command: 'phantomjs',
    version: '1.9.7',
    name: 'phantom',
    re: /(\S+)/,
    type: 'phantom',
    headless: true,
    profile: true },
  { command: 'firefox',
    version: '24.3.0',
    name: 'firefox',
    re: /Mozilla Firefox (\S+)/,
    type: 'firefox',
    profile: true } ]

It works:

-bash-4.1$ phantomjs tests/index.js
Error: Cannot find module 'assert'

  phantomjs://bootstrap.js:289
  phantomjs://bootstrap.js:254 in require
  tests/index.js:13

but yet testling can't find it:

-bash-4.1$ make coverage
./node_modules/.bin/browserify -t coverify tests/index.js | testling | ./node_modules/.bin/coverify
No headless browser found.

Any suggestions?

Did you install phantomjs after you ran browser-launcher for the first time? It seems to cache a config, not quite sure why. The following fixed it for me

rm ~/.config/browser-launcher/config.json

@orangemug thanks for the tip. Fixed the issue for me.

@orangemug Thanks, that fixed it for me as well. The readme should include phantomjs as a dependency.