Modify tests and fix NaN issue in chrome

This commit is contained in:
Kegan Myers 2014-03-03 15:08:37 -06:00
parent d87e5f41ea
commit ef8e1eeb9c
5 changed files with 36 additions and 31 deletions

View file

@ -7,7 +7,11 @@ module.exports = function (grunt) {
unit: {
configFile: "karma.conf.js",
singleRun: true,
browsers: ['PhantomJS']
browsers: ["PhantomJS", "Chrome"]
},
watch: {
configFile: "karma.conf.js",
browsers: ["PhantomJS", "Chrome"]
}
},
typescript: {

View file

@ -193,7 +193,7 @@ var Typertext;
if (typeof path === "undefined") { path = "/"; }
if (typeof queryString === "undefined") { queryString = {}; }
if (typeof port === "undefined") { port = 0; }
if (port < 1 || port > 65535) {
if (port < 1 || port > 65535 || isNaN(port)) {
port = HttpUrl.DefaultPort(protocol);
}

File diff suppressed because one or more lines are too long

View file

@ -141,7 +141,7 @@ module Typertext.Http {
* @constructor
*/
constructor(domain:string, protocol:HttpProtocol = HttpProtocol.http, path:string = "/", queryString:HttpQueryString = {}, port:number = 0) {
if (port < 1 || port > 65535) {
if (port < 1 || port > 65535 || isNaN(port)) {
port = HttpUrl.DefaultPort(protocol);
}

View file

@ -1,29 +1,30 @@
{
"name": "Typertext",
"description": "A simple TypeScript HTTP request library",
"repository": {
"type": "git",
"url": "https://github.com/terribleplan/Typertext.git"
},
"version": "0.3.1",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-typescript": "~0.2.7",
"karma-script-launcher": "~0.1.0",
"karma-chrome-launcher": "~0.1.2",
"karma-firefox-launcher": "~0.1.3",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.5",
"karma-coffee-preprocessor": "~0.1.3",
"requirejs": "~2.1.11",
"karma-requirejs": "~0.2.1",
"karma-phantomjs-launcher": "~0.1.2",
"karma": "~0.10.9",
"grunt-karma": "~0.6.2",
"phantomjs": "~1.9.7-1"
},
"license": "MIT",
"scripts": {
"test": "./node_modules/.bin/karma start karma.conf.js --single-run"
}
"name": "Typertext",
"description": "A simple TypeScript HTTP request library",
"repository": {
"type": "git",
"url": "https://github.com/terribleplan/Typertext.git"
},
"version": "0.3.1",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-cli": "~0.1.13",
"grunt-typescript": "~0.2.7",
"karma-script-launcher": "~0.1.0",
"karma-chrome-launcher": "~0.1.2",
"karma-firefox-launcher": "~0.1.3",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.5",
"karma-coffee-preprocessor": "~0.1.3",
"requirejs": "~2.1.11",
"karma-requirejs": "~0.2.1",
"karma-phantomjs-launcher": "~0.1.2",
"karma": "~0.10.9",
"grunt-karma": "~0.6.2",
"phantomjs": "~1.9.7-1"
},
"license": "MIT",
"scripts": {
"test": "./node_modules/.bin/grunt test"
}
}