Modify tests and fix NaN issue in chrome
This commit is contained in:
parent
d87e5f41ea
commit
ef8e1eeb9c
|
@ -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: {
|
||||
|
|
|
@ -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
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"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",
|
||||
|
@ -24,6 +25,6 @@
|
|||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/karma start karma.conf.js --single-run"
|
||||
"test": "./node_modules/.bin/grunt test"
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue