Fix: Todo Multi refresh ...

fix some promises problem
This commit is contained in:
Paolo Arena
2019-02-14 19:01:41 +01:00
parent 0b4ac6391d
commit f6fa45a9e9
13 changed files with 191 additions and 121 deletions

View File

@@ -36,7 +36,7 @@ const IndexTodoToCreate = 3;
// const useragent = "auth Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36";
const useragent = "node-superagent/2.3.0";
const testsingolo = true;
const testsingolo = false;
if (testsingolo) {
describe('POST /users/login', () => {
@@ -63,7 +63,7 @@ if (testsingolo) {
User.findById(users[0]._id).then((user) => {
expect(user.tokens[0]).toInclude({
access: 'auth ' + useragent,
access: 'auth',
// token: res.headers['x-auth'],
date_login: date_login
});
@@ -160,7 +160,7 @@ if (testsingolo) {
User.findById(users[0]._id).then((user) => {
expect(user.tokens[0]).toInclude({
access: 'auth ' + useragent,
access: 'auth',
// token: res.headers['x-auth'],
date_login: date_login
});