Browse Source

:%s/8000/PORT/g for a few tests

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
0e713e7482
  1. 6
      test/simple/test-http-set-timeout.js
  2. 3
      test/simple/test-http-write-empty-string.js

6
test/simple/test-http-set-timeout.js

@ -11,17 +11,17 @@ server = http.createServer(function (req, res) {
server.close(); server.close();
}); });
}); });
server.listen(8000); server.listen(PORT);
server.addListener('listening', function () { server.addListener('listening', function () {
sys.puts('Server running at http://127.0.0.1:8000/'); sys.puts('Server running at http://127.0.0.1:'+PORT+'/');
errorTimer =setTimeout(function () { errorTimer =setTimeout(function () {
throw new Error('Timeout was not sucessful'); throw new Error('Timeout was not sucessful');
}, 2000); }, 2000);
http.cat('http://localhost:8000/', 'utf8', function (err, content) { http.cat('http://localhost:'+PORT+'/', 'utf8', function (err, content) {
clearTimeout(errorTimer); clearTimeout(errorTimer);
sys.puts('HTTP REQUEST COMPLETE (this is good)'); sys.puts('HTTP REQUEST COMPLETE (this is good)');
}); });

3
test/simple/test-http-write-empty-string.js

@ -1,4 +1,5 @@
PORT = 8000; require('../common');
sys = require('sys'); sys = require('sys');
http = require('http'); http = require('http');
assert = require('assert'); assert = require('assert');

Loading…
Cancel
Save