i'm trying to test a piece of asynchronous code but sadly enough i'm getting an obscure error code and i cant seem to figure out what the issue is. The test runs fine in the browser but running it in phantomjs results in:
Uncaught Script error. (:0)
The test is written as an requirejs module and has a dependency on another module. Like i said this works fine in the browser, and when doing none async tests everything works fine in phantomjs as well. I'm using phantomjs 1.9.12 and mocha-phantomjs 3.4.1.
define([ "csl" ], function( csl )
{
describe( "CSL", function()
{
it( "isLoggedIn", function( testCompleted )
{
csl.isLoggedIn().then( function( partner )
{
chai.expect( partner ).to.be.a( "object" );
testCompleted();
} )
.fail( function( error )
{
testCompleted( error );
} );
} );
} );
} );
file:
scheme. Instead serve all scripts from a single server. Also see here: github.com/mochajs/mocha/issues/165 – Tad Lispy