Lint for test.

This commit is contained in:
gaba
2016-11-04 09:43:01 -07:00
parent 6f52dfa554
commit 730bd29bd1
3 changed files with 6 additions and 6 deletions
+3
View File
@@ -1,13 +1,16 @@
const express = require('express');
const Comment = require('../../../models/comment');
const User = require('../../../models/user');
const Action = require('../../../models/action');
const router = express.Router();
router.get('/', (req, res, next) => {
const comments = Comment.findByAssetId(req.query.asset_id) || [];
const users = User.findByIdArray(comments.map((comment) => comment.author_id));
const actions = Action.findByItemIdArray(comments.map((comment) => comment.id));
res.json(comments.concat(users).concat(actions)).catch(next);
});
+1 -1
View File
@@ -5,6 +5,6 @@
},
"extends": "eslint:recommended",
"rules": {
no-undef: [1]
"no-undef": [0]
}
}
+2 -5
View File
@@ -1,10 +1,7 @@
// Modified from https://github.com/elliotf/mocha-mongoose
var mongoose = require('mongoose');
// ensure the NODE_ENV is set to 'test'
// this is helpful when you would like to change behavior when testing
// Ensure the NODE_ENV is set to 'test',
// this is helpful when you would like to change behavior when testing.
process.env.NODE_ENV = 'test';
beforeEach(function (done) {