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
// Version: v1.0.0-pre.2-291-g4785901 | |
// Last commit: 4785901 (2013-01-05 18:57:16 +0100) | |
(function() { | |
/*global __fail__*/ | |
/** | |
Ember Debug |
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
// Version: v1.0.0-pre.2-291-g4785901 | |
// Last commit: 4785901 (2013-01-05 18:57:16 +0100) | |
(function() { | |
/*global __fail__*/ | |
/** | |
Ember Debug |
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 expect = require('expect.js'), | |
Browser = require('zombie'); | |
var browser = new Browser({waitDuration: 1500}); | |
describe('Status Codes', function(){ | |
this.timeout(2000); | |
it('Unauthorized', function(done){ |
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 zombie = require("zombie"); | |
var assert = require("assert"); | |
zombie.debug = true; | |
var browser = new zombie(); | |
browser.visit("http://google.com/") | |
.then(function(){ | |
assert.equal(browser.statusCode, 401); |
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
// Try to be as sensible as possible about parsing durations | |
function parseDuration(duration) { | |
// .75 | |
if (match = /^\.\d+$/.exec(duration)) { | |
return parseFloat("0" + match[0]) * 3600; | |
// 4 or 11.75 | |
} else if (match = /^\d+(?:\.\d+)?$/.exec(duration)) { | |
return parseFloat(match[0]) * 3600; | |
// 01:34 | |
} else if (match = /^(\d+):(\d+)$/.exec(duration)) { |
NewerOlder