Created
March 26, 2012 15:51
-
-
Save erithmetic/2206102 to your computer and use it in GitHub Desktop.
Testling issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = require('testling'), | |
CM1 = require('./lib/cm1'); | |
test('CM1.impacts', function(t) { | |
t.plan(3); | |
CM1.impacts('flight', { | |
origin_airport: 'IAD', | |
destination_airport: 'PDX', | |
airline: 'United', | |
trips: 2, | |
segments_per_trip: 1 | |
}, | |
function(err, impacts) { | |
t.notOk(err); | |
t.ok(impacts.carbon > 0); | |
t.ok(impacts.methodology); | |
t.end(); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
caladan:CM1.js dkastner$ testling browser.js | |
The "sys" module is now called "util". It should have a similar interface. | |
node/jsdom 3/3 100 % ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
caladan:~ dkastner$ mkdir CM1.js-test | |
caladan:~ dkastner$ cd CM1.js-test | |
caladan:CM1.js-test dkastner$ mkdir node_modules | |
caladan:CM1.js-test dkastner$ npm install CM1 testling | |
# note: changed require() statement from require('./lib/cm1') to require('CM1') | |
caladan:CM1.js-test dkastner$ testling browser.js -b chrome/14.0 | |
The "sys" module is now called "util". It should have a similar interface. | |
node/jsdom 0/0 0 % okchrome/14.0: | |
error: Cannot find module 'CM1' | |
at require() in /test.js : line: 2, column: 11 | |
> CM1 = require('CM1'); | |
total ............................................... 0/0 | |
^Ccaladan:CM1.js-test dkastner$ | |
caladan:CM1.js-test dkastner$ tar -cf- . | curl -u [email protected] -vsSNT- testling.com/?browsers=iexplore/9.0 | |
Enter host password for user '[email protected]': | |
* About to connect() to testling.com port 80 (#0) | |
* Trying 50.57.138.111... connected | |
* Connected to testling.com (50.57.138.111) port 80 (#0) | |
* Server auth using Basic with user '[email protected]' | |
> PUT /?browsers=iexplore/9.0 HTTP/1.1 | |
> Authorization: Basic ZGthc3RuZXJAZ21haWwuY29tOmZhdGJveQ== | |
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3 | |
> Host: testling.com | |
> Accept: */* | |
> Transfer-Encoding: chunked | |
> Expect: 100-continue | |
> | |
< HTTP/1.1 100 Continue | |
} [data not shown] | |
* Empty reply from server | |
* Connection #0 to host testling.com left intact | |
curl: (52) Empty reply from server | |
* Closing connection #0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment