cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian LeRoux...@brian.io>
Subject failing tests / experiment to move to phantomjs for testing cordovajs
Date Thu, 12 Dec 2013 06:11:19 GMT
I'm experimenting in a branch with PhantomJS for testing cordova-js.
Rational being that we are currently emulating a browser using JSDom when
our abstraction actually targets browsers. (Note: you can run the Jasmine
tests in the browser too.)

The tests all pass in Chrome and Node but some are failing in Phantom.

base64:: can base64 encode strings correctly: failed
  TypeError: 'undefined' is not a function (evaluating
'arrayBuffer.slice(0,1)') in
file:///Users/brianleroux/Desktop/cordova-js/test/test.base64.js (line 31)
(1)

modulemapper:: should clobber existing properties: failed
  TypeError: setting a property that has only a getter in
file:///Users/brianleroux/Desktop/cordova-js/pkg/cordova.test.js (line
1852) (1)
  TypeError: setting a property that has only a getter in
file:///Users/brianleroux/Desktop/cordova-js/pkg/cordova.test.js (line
1836) (2)

urlutil:: can handle root-relative URLs: failed
  Expected 'file:///' to be 'file:///Users/'. (1)
  Expected 'file:///foo?a#b' to be 'file:///Users/foo?a#b'. (2)
  Expected 'file:///foo/b%20ar' to be 'file:///Users/foo/b%20ar'. (3)

=/

Is this worth the effort or is the existing test solution good enough? Any
ideas why the above would fail in Phantom but not Chrome?

You can see the work in progress here:

https://github.com/brianleroux/cordova-js/tree/phantom

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message