v3 adapt v2: lint client only shared ops and enable members integration tests

This commit is contained in:
Matteo Pagliazzi
2016-04-07 11:54:36 +02:00
parent d49847688e
commit 2d3fbe9f13
13 changed files with 121 additions and 108 deletions

View File

@@ -1,14 +1,12 @@
import moment from 'moment';
import _ from 'lodash';
/*
Preen 3-day past-completed To-Dos from Angular & mobile app
*/
// TODO used only in v2 client
module.exports = function(tasks) {
return _.filter(tasks, function(t) {
return !t.completed || (t.challenge && t.challenge.id) || moment(t.dateCompleted).isAfter(moment().subtract({
days: 3
module.exports = function preenTodos (tasks) {
return _.filter(tasks, (t) => {
return !t.completed || t.challenge && t.challenge.id || moment(t.dateCompleted).isAfter(moment().subtract({
days: 3,
}));
});
};