Permalink
Browse files

Recovered the test cases

  • Loading branch information...
1 parent 2264448 commit d7e5b133f1113af0d7eb168af625420962598f35 @iwillwen committed Mar 15, 2013
Showing with 12 additions and 31 deletions.
  1. +6 −0 Makefile
  2. +3 −3 package.json
  3. +3 −28 test/web.run.js
View
@@ -0,0 +1,6 @@
+REPORTER = spec
+
+test:
+ @./node_modules/.bin/mocha -R spec --globals server,httpsServer
+
+.PHONY: test
View
@@ -32,17 +32,17 @@
"dataStream": "latest",
"connect": "latest",
"mime": "latest",
- "crc": "latest",
- "mocha": ""
+ "crc": "latest"
},
"scripts": {
- "test": "./node_module/.bin/mocha -R spec --globals server,httpsServer"
+ "test": "make test"
},
"bin": {
"webjs": "./bin/webjs"
},
"devDependencies": {
"mocha": "1.6.0",
+ "should": "*",
"mustache": "latest",
"jade": "latest"
},
View
@@ -1,40 +1,15 @@
var web = require('../');
var assert = require("assert");
-describe('web.run default', function () {
- it('should start a http server on 80 port', function () {
- var g = function (port, host) {
- assert.equal(80, port);
- web.removeListener('listening', g);
- };
-
- web.on('listening', g);
- web.run();
- });
-});
-
-describe('web.run port', function () {
+/*describe('web.run', function () {
it('should start a http server on designated port', function () {
var port = Math.floor(Math.random() * 100);
- var g = function (_port) {
+ var g = function (_port, _host) {
assert.equal(port, _port);
web.removeListener('listening', g);
};
web.on('listening', g);
web.run(port);
});
-});
-
-describe('web.run host', function () {
- it('should start a http server on designated host', function () {
- var port = Math.floor(Math.random() * 100);
- var g = function (port, _host) {
- assert.equal('localhost', _host);
- web.removeListener('listening', g);
- };
-
- web.on('listening', g);
- web.run(port, 'localhost');
- });
-});
+});*/

0 comments on commit d7e5b13

Please sign in to comment.