Questions tagged [mocha-phantomjs]

Mocha is a feature-rich JavaScript test framework running on node and the browser.

The mocha-phantomjs project provides a mocha-phantomjs.coffee script file and extensions to drive PhantomJS while testing your HTML pages with Mocha from the console. The preferred usage is to install mocha-phantomjs via node's packaged modules and use the mocha-phantomjs binary wrapper.

57 questions
0
votes
1 answer

How can I access PhantomJS WebPage module from inside Mocha tests in NodeJS?

I'm basing this off of the Page Loading section of http://phantomjs.org/quick-start.html I want to do something like this: tests.js var should = require('chai').should(); var page = require('webpage').create(); describe('test website with…
Eric Ihli
  • 1,722
  • 18
  • 30
0
votes
2 answers

Travis build for mocha-phantomjs test is failing

I am testing a API using mocha-phantomjs test. Tests are passing when i try to run it from my system but when i try to do it on Travis CI it says permission denied could not figure out how to process for that. Build link…
Vipul
  • 566
  • 5
  • 29
0
votes
1 answer

mocha-phantomjs xunit reporter and file output not working

using $mocha-phantomjs -R xunit -f outputFile.xml myPage.html ----> this is generating a console output in xml format but not writing in the output file. On the other hand : $mocha-phantomjs -R json -f outputFile.json myPage.html -----> this is…
0
votes
1 answer

Requirejs not loading a jquery plugin

I'm working on improving the tests for jquery-csv (jquery plugin). I can currently run a full suite of tests (ie mocha/chai) from the command line with no problems. I'm having issues figuring out how to use require.js to load dependencies so I can…
Evan Plaice
  • 13,944
  • 6
  • 76
  • 94
0
votes
0 answers

Unit testing with Mocha+PhantomJS async code

I'm new to unit testing, so please forrgive me if my question could be silly. I wrote an unit test using Mocha with PhantomJS and Chai as assertion library. The code that I want to test is the following function: function…
ltedone
  • 639
  • 1
  • 6
  • 12
0
votes
1 answer

how to setup tests for mocha-phantomjs

Every tutorial I have seen for mocha-phantomjs shows having a test harness html file, and a separate javascript file that gets included. Is this the correct way to do this for each test? I want to create a separate test for each page in my website,…
FlimboyJim
  • 69
  • 6
0
votes
1 answer

Mocha-PhantomJS - Cannot find Path and Cannot find variable: Mocha

I have a suite of tests that are running in the browser using Mocha, but now I want to use PhantomJS so I can run my unit tests on our CI server. I am getting a few errors when running the mocha-phantomjs command on my test.html file. This is the…
gwin003
  • 7,432
  • 5
  • 38
  • 59
0
votes
1 answer

TestRunner Not Running My Mocha / Chai Tests

Despite my best efforts, I can't seem to get my testRunner.html to acknowledge my tests when I run the testRunner.html page in the browser. I've confirmed that it pulls in the test files and runs through the expect but the test runner is still…
Levi Hackwith
  • 9,232
  • 18
  • 64
  • 115
0
votes
1 answer

Cannot trigger event on element in js-fixture with Karma and Mocha

I am using js-fixture, Mocha, Chai, Sinon with Karma. I am able to see the correct element in wrapper. However when I trigger the click event my click event is never triggered. I am assuming the event is never binding to the element. Am I doing…
zmanc
  • 5,201
  • 12
  • 45
  • 90
0
votes
1 answer

Error when running Mocha tests with mochaphantom js in a Durandal environment

I have a problem including mocha tests in a durandal environment. I want to run my tests with mocha-phantomjs from the command line. The test works perfectly in the browser but as soon as I'm trying to use mocha-phantomjs I'm getting the following…
andreaspfr
  • 2,298
  • 5
  • 42
  • 51
-1
votes
1 answer

phantomjs terminated with signal SIGSEGV

When I run "mocha-phantomjs -R dot /test/file.html", The Program catch the error "phantomjs terminated with signal SIGSEGV". I don't know what happened! What should I do?
-1
votes
2 answers

mocha-phantomjs output not shown when run with Python subprocess.check_output

Guessing this is something to do with STDOUT/STDERR redirection, but the console output is not displayed when running #!/usr/bin/env python import subprocess subprocess.check_output('mocha-phantomjs static/js/tests/headless.html'.split()) The same…
igniteflow
  • 8,404
  • 10
  • 38
  • 46
1 2 3
4