Permalink
Browse files

More versatile test

  • Loading branch information...
1 parent 168a754 commit 3e905062fa4351bee92ff5cd7fd82a3f30f510b3 @sylvinus sylvinus committed Feb 26, 2013
Showing with 7 additions and 4 deletions.
  1. +3 −0 README.md
  2. +1 −1 lib/crawler.js
  3. +1 −1 package.json
  4. +1 −1 test/mockserver.js
  5. +1 −1 test/units/simple.js
View
@@ -143,6 +143,9 @@ Rough todolist
ChangeLog
---------
+0.2.4
+ - Fixed a bug with response.body being a Buffer in some cases
+ - Wrapped jsdom calls in a try/catch to isolate us from crashes
0.2.3
- Added gzip support
View
@@ -21,7 +21,7 @@ if (!iconv) {
}
-exports.VERSION = "0.2.4";
+exports.VERSION = "0.2.5";
exports.Crawler = function(options) {
View
@@ -1,6 +1,6 @@
{
"name": "crawler",
- "version": "0.2.4",
+ "version": "0.2.5",
"description": "Crawler is a web spider written with Nodejs. It gives you the full power of jQuery on the server to parse a big number of pages as they are downloaded, asynchronously. Scraping should be simple and fun!",
"keywords": [
"dom",
View
@@ -17,7 +17,7 @@ app.get('/empty', function(req, res){
});
app.get('/echo_useragent', function(req, res){
- res.send("<html>Your user agent: "+req.headers["user-agent"]+"</html>");
+ res.send("Your user agent: "+req.headers["user-agent"]);
});
app.get('/close/end', function(req, res){
@@ -98,7 +98,7 @@ test("one request + user agent", function() {
"jQuery":false,
"callback":function(error,result,$) {
equal(error,null);
- ok(result.body=="<html>Your user agent: test/1.2</html>");
+ ok(result.body=="Your user agent: test/1.2");
start();
}
});

0 comments on commit 3e90506

Please sign in to comment.