Skip to content

Commit

Permalink
Code format.
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Mar 17, 2013
1 parent 3958702 commit 6e7e306
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/readability.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var jsdom = require('jsdom'),
fetchUrl = require('fetch').fetchUrl,
helpers = require('./helpers');
var jsdom = require('jsdom');
var fetchUrl = require('fetch').fetchUrl;
var helpers = require('./helpers');

exports.debug = function (debug) {
helpers.debug(debug);
Expand Down
19 changes: 7 additions & 12 deletions test/readability.test.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
var readability = require('../src/readability')
, should = require('should');

// uncoment the following line to print the debug info to console.
// readability.debug(true);

var readability = require('../src/readability');
require('should');

describe('node-readability', function () {

it('should get document', function (done) {
readability.read('http://colorlines.com/archives/2011/08/dispatch_from_angola_faith-based_slavery_in_a_louisiana_prison.html', function(err, read) {
if (err) return done(err)
if (err) return done(err);
var dom = read.getDocument();
var html = '<html><head><meta charset="utf-8"><title>'+dom.title+'</title></head><body><h1>'+read.getTitle()+'</h1>'+read.getContent()+'</body></html>';
html.should.include('<title>Dispatch From Angola: Faith-Based Slavery in a Louisiana Prison - COLORLINES</title>')
done()
html.should.include('<title>Dispatch From Angola: Faith-Based Slavery in a Louisiana Prison - COLORLINES</title>');
done();
});
})
})
});
});

0 comments on commit 6e7e306

Please sign in to comment.