Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sort articles by date for glog tests

  • Loading branch information...
commit 749b5a91e9a0a4924fa68061c8de6a222f746db6 1 parent c54a70e
@wlaurance wlaurance authored
Showing with 6 additions and 1 deletion.
  1. +3 −0  package.json
  2. +3 −1 test/glog_tests.js
View
3  package.json
@@ -12,6 +12,9 @@
"async": ">= 0.1.22",
"config": "~0.4.17"
},
+ "devDependencies": {
+ "underscore": "~1.4.2"
+ },
"scripts": {
"test": "make test"
}
View
4 test/glog_tests.js
@@ -1,5 +1,6 @@
var assert = require('assert'),
- exec = require('child_process').exec;
+ exec = require('child_process').exec,
+ _ = require('underscore');
describe('Glog', function() {
@@ -89,6 +90,7 @@ describe('Glog', function() {
glog.load_plugins(options, function(){
glog.load_articles(options, function(articles) {
glog.render_blog(options, articles, function() {
+ articles = _.sortBy(articles, 'date');
assert.equal(articles[0].show_on_home_page, false);
assert.equal(articles[1].show_on_home_page, true);
done();
Please sign in to comment.
Something went wrong with that request. Please try again.