Closed ff6347 closed 5 years ago
✨ Good work on this PR so far! ✨ Unfortunately, the Travis CI build is failing as of 8fd1abc9b3ce56f56ab636a76cdf54cc8022d6e6. Here's the output:
npm test
> flusshygiene-postgres-api@1.9.10 test /home/travis/build/technologiestiftung/flusshygiene-postgres-api
> jest --runInBand
Setup jest for all tests
writing token to disk
done with setup
FAIL __tests__/routes/users/users.spots.collection.test.ts (67.883s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.spots.collection.test.ts:51
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.spots.collection.test.ts:47:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● Testing all collection tyoe › should fail due to wrong user id route GET user by id spot by id predictions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong user id route GET user by id spot by id predictions
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 200
97 | .get('/api/v1/users/5/bathingspots/1/predictions')
98 | .set(headers);
> 99 | expect(res.status).toBe(404);
| ^
100 | expect(Array.isArray(res.body.success)).toBe(false);
101 | done();
102 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:99:24)
● Testing all collection tyoe › should fail due to wrong spot id route GET user by id spot by id predictions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong spot id route GET user by id spot by id predictions
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 200
106 | .get('/api/v1/users/1/bathingspots/1000/predictions')
107 | .set(headers);
> 108 | expect(res.status).toBe(404);
| ^
109 | expect(Array.isArray(res.body.success)).toBe(false);
110 | done();
111 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:108:24)
● Testing all collection tyoe › should fail due to wrong collection id/name rain intead of rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong collection id/name rain intead of rains
TypeError: Cannot read property '0' of undefined
118 | // console.log(spotRes.body);
119 | const rainRes = await request(app)
> 120 | .post(`/api/v1/users/1/bathingspots/${spotRes.body.data[0].id}/rains`)
| ^
121 | .send({
122 | date: '08-Jan-1999',
123 | dateTime: '05:23:42',
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:120:62)
● Testing all collection tyoe › should fail due to wrong collection id/name
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong collection id/name
TypeError: Cannot read property '0' of undefined
142 | // console.log(spotRes.body);
143 | const rainRes = await request(app)
> 144 | .post(`/api/v1/users/1/bathingspots/${spotRes.body.data[0].id}/rains`)
| ^
145 | .send({
146 | date: '08-Jan-1999',
147 | dateTime: '05:23:42',
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:144:62)
● Testing all collection tyoe › should pass GET collection item
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should pass GET collection item
TypeError: Cannot read property '0' of undefined
168 | // console.log(spotRes.body);
169 | const rainRes = await request(app)
> 170 | .post(`/api/v1/users/1/bathingspots/${spotRes.body.data[0].id}/rains`)
| ^
171 | .send({
172 | date: '08-Jan-1999',
173 | dateTime: '05:23:42',
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:170:62)
● Testing all collection tyoe › should pass GET genericInput Measurement
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong spot ID
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong spot ID
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
232 | .set(headers);
233 | // console.log(res.body);
> 234 | expect(res.status).toBe(404);
| ^
235 | expect(res.body.success).toBe(false);
236 | done();
237 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:234:24)
● Testing all collection tyoe › should fail GET collection item by wrong id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail GET collection item by wrong id
TypeError: Cannot read property '0' of undefined
244 | // console.log(spotRes.body);
245 | const rainRes = await request(app)
> 246 | .post(`/api/v1/users/1/bathingspots/${spotRes.body.data[0].id}/rains`)
| ^
247 | .send({
248 | date: '08-Jan-1999',
249 | dateTime: '05:23:42',
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:246:62)
● Testing all collection tyoe › route GET user by id spot by id predictions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id predictions
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
275 | .set(headers);
276 | expect(res.status).toBe(200);
> 277 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
278 | done();
279 | });
280 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:277:42)
● Testing all collection tyoe › route GET user by id spot by id measurements
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id measurements
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
284 | .set(headers);
285 | expect(res.status).toBe(200);
> 286 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
287 | done();
288 | });
289 | test('route GET user by id spot by id discharges', async (done) => {
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:286:42)
● Testing all collection tyoe › route GET user by id spot by id discharges
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id discharges
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
292 | .set(headers);
293 | expect(res.status).toBe(200);
> 294 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
295 | done();
296 | });
297 | test('route GET user by id spot by id rains', async (done) => {
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:294:42)
● Testing all collection tyoe › route GET user by id spot by id rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id rains
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
300 | .set(headers);
301 | expect(res.status).toBe(200);
> 302 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
303 | done();
304 | });
305 | test('route GET user by id spot by id globalIrradiances', async (done) => {
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:302:42)
● Testing all collection tyoe › route GET user by id spot by id globalIrradiances
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id globalIrradiances
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
308 | .set(headers);
309 | expect(res.status).toBe(200);
> 310 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
311 | done();
312 | });
313 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:310:42)
● Testing all collection tyoe › route GET user by id spot by id models
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id models
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
317 | .set(headers);
318 | expect(res.status).toBe(200);
> 319 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
320 | done();
321 | });
322 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:319:42)
● Testing all collection tyoe › route GET user by id spot by id models should not have field rmodel
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id models should not have field rmodel
TypeError: Cannot read property '0' of undefined
331 | .set(headers);
332 | expect(res.status).toBe(200);
> 333 | expect(res.body.data[0].rmodel).toBeUndefined();
| ^
334 | done();
335 | });
336 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:333:25)
● Testing all collection tyoe › route GET user by id spot by id purificationPlants
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id purificationPlants
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
340 | .set(headers);
341 | expect(res.status).toBe(200);
> 342 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
343 | done();
344 | });
345 | test('route GET user by id spot by id genericInputs', async (done) => {
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:342:42)
● Testing all collection tyoe › route GET user by id spot by id genericInputs
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id genericInputs
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
348 | .set(headers);
349 | expect(res.status).toBe(200);
> 350 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
351 | done();
352 | });
353 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:350:42)
● Testing all collection tyoe › route POST user by id spot by id predictions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id predictions
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
375 | })
376 | .set(headers);
> 377 | expect(res.status).toBe(201);
| ^
378 | expect(Array.isArray(res.body.data)).toBe(true);
379 | done();
380 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:377:24)
● Testing all collection tyoe › route POST user by id spot by id measurements
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id measurements
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
403 | })
404 | .set(headers);
> 405 | expect(res.status).toBe(201);
| ^
406 | expect(Array.isArray(res.body.data)).toBe(true);
407 | done();
408 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:405:24)
● Testing all collection tyoe › route POST user by id spot by id discharges
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id discharges
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
417 | })
418 | .set(headers);
> 419 | expect(res.status).toBe(201);
| ^
420 | expect(Array.isArray(res.body.data)).toBe(true);
421 | done();
422 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:419:24)
● Testing all collection tyoe › route POST user by id spot by id rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id rains
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
431 | })
432 | .set(headers);
> 433 | expect(res.status).toBe(201);
| ^
434 | expect(Array.isArray(res.body.data)).toBe(true);
435 | done();
436 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:433:24)
● Testing all collection tyoe › route POST user by id spot by id globalIrradiances
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id globalIrradiances
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
445 | })
446 | .set(headers);
> 447 | expect(res.status).toBe(201);
| ^
448 | expect(Array.isArray(res.body.data)).toBe(true);
449 | done();
450 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:447:24)
● Testing all collection tyoe › route POST user by id spot by id models
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id models
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
457 | })
458 | .set(headers);
> 459 | expect(res.status).toBe(201);
| ^
460 | expect(Array.isArray(res.body.data)).toBe(true);
461 | done();
462 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:459:24)
● Testing all collection tyoe › route POST user by id spot by id purificationPlants
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id purificationPlants
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
468 | })
469 | .set(headers);
> 470 | expect(res.status).toBe(201);
| ^
471 | expect(Array.isArray(res.body.data)).toBe(true);
472 | done();
473 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:470:24)
● Testing all collection tyoe › route POST user by id spot by id genericInputs
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id genericInputs
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
479 | })
480 | .set(headers);
> 481 | expect(res.status).toBe(201);
| ^
482 | expect(Array.isArray(res.body.data)).toBe(true);
483 | done();
484 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:481:24)
FAIL __tests__/routes/bathingspots/bathingspots-collection.integration.test.ts (62.591s)
● Console
console.warn __tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:83
Cannot read property 'map' of undefined
● testing bathingspots collection › post collection item should expect array or object
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › post collection item should expect array or object
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
128 | .send(arr)
129 | .set(headers);
> 130 | expect(res.status).toBe(201);
| ^
131 | done();
132 | });
133 |
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:130:24)
● testing bathingspots collection › route POST users bathingspots collection rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route POST users bathingspots collection rains
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
143 | .send(obj)
144 | .set(headers);
> 145 | expect(res.status).toBe(201);
| ^
146 | expect(Array.isArray(res.body.data)).toBe(true);
147 | expect(res.body.success).toBe(true);
148 | expect(res.body.data[0].comment).toBe(obj.comment);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:145:24)
● testing bathingspots collection › route DELETE users bathingspots collection rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route DELETE users bathingspots collection rains
TypeError: Cannot read property '0' of undefined
161 | .set(headers);
162 | const res = await request(app)
> 163 | .delete(`/api/v1/users/1/bathingspots/1/rains/${resPost.body.data[0].id}`)
| ^
164 | .set(headers);
165 | expect(res.status).toBe(200);
166 | expect(Array.isArray(res.body.data)).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:163:72)
● testing bathingspots collection › route POST users bathingspots collection genericInputs measurements
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route POST users bathingspots collection genericInputs measurements
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
185 | .send(obj)
186 | .set(headers);
> 187 | expect(res.status).toBe(201);
| ^
188 | expect(Array.isArray(res.body.data)).toBe(true);
189 | expect(res.body.success).toBe(true);
190 | expect(res.body.data[0].comment).toBe(obj.comment);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:187:24)
● testing bathingspots collection › route BULK POST users bathingspot collection genericInputs measurement
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route BULK POST users bathingspot collection genericInputs measurement
TypeError: Cannot read property '0' of undefined
214 | const res = await request(app)
215 | .post(
> 216 | `/api/v1/users/1/bathingspots/1/genericInputs/${resCreate.body.data[0].id}/measurements`,
| ^
217 | )
218 | .send(arr)
219 | .set(headers);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:216:76)
● testing bathingspots collection › getColletionItemById should return specific entitiy GenericInput
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy GenericInput
TypeError: Cannot read property '0' of undefined
232 | .set(headers);
233 | const entity = await getColletionItemById(
> 234 | res.body.data[0].id,
| ^
235 | 'GenericInput',
236 | );
237 | expect(entity instanceof GenericInput).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:234:20)
● testing bathingspots collection › getColletionItemById should return specific entitiy PurificationPlant
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy PurificationPlant
TypeError: Cannot read property '0' of undefined
244 | .set(headers);
245 | const entity = await getColletionItemById(
> 246 | res.body.data[0].id,
| ^
247 | 'PurificationPlant',
248 | );
249 | expect(entity instanceof PurificationPlant).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:246:20)
● testing bathingspots collection › getColletionItemById should return specific entitiy Discharge
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy Discharge
TypeError: Cannot read property '0' of undefined
256 | .send({ dateTime: '12:00:00', date: '2019-12-31', value: 1 })
257 | .set(headers);
> 258 | const entity = await getColletionItemById(res.body.data[0].id, 'Discharge');
| ^
259 | expect(entity instanceof Discharge).toBe(true);
260 | done();
261 | });
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:258:60)
● testing bathingspots collection › getColletionItemById should return specific entitiy GlobalIrradiance
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy GlobalIrradiance
TypeError: Cannot read property '0' of undefined
267 | .set(headers);
268 | const entity = await getColletionItemById(
> 269 | res.body.data[0].id,
| ^
270 | 'GlobalIrradiance',
271 | );
272 | expect(entity instanceof GlobalIrradiance).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:269:20)
● testing bathingspots collection › route get users bathingspots collection rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route get users bathingspots collection rains
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
279 | .set(headers);
280 | expect(res.status).toBe(200);
> 281 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
282 | expect(res.body.success).toBe(true);
283 | done();
284 | });
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:281:42)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotMeasurement
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotMeasurement
TypeError: Cannot read property '0' of undefined
290 | .set(headers);
291 | const entity = await getColletionItemById(
> 292 | res.body.data[0].id,
| ^
293 | 'BathingspotMeasurement',
294 | );
295 | expect(entity instanceof BathingspotMeasurement).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:292:20)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotModel
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotModel
TypeError: Cannot read property '0' of undefined
302 | .set(headers);
303 | const entity = await getColletionItemById(
> 304 | res.body.data[0].id,
| ^
305 | 'BathingspotModel',
306 | );
307 | expect(entity instanceof BathingspotModel).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:304:20)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotPrediction
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotPrediction
TypeError: Cannot read property '0' of undefined
319 | .set(headers);
320 | const entity = await getColletionItemById(
> 321 | res.body.data[0].id,
| ^
322 | 'BathingspotPrediction',
323 | );
324 | expect(entity instanceof BathingspotPrediction).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:321:20)
● testing bathingspots collection › getColletionItemById should throw an error
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return undefiend
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should throw an error
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › testing delete fail for not existing element
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › testing delete fail for not existing element
expect(received).resolves.toBe()
Received promise rejected instead of resolved
Rejected to value: [RepositoryNotFoundError: No repository for "PurificationPlant" was found. Looks like this entity is not registered in current "default" connection?]
337 | });
338 | test('getColletionItemById should return undefiend', async (done) => {
> 339 | expect(getPPlantWithRelations('100')).resolves.toBe(undefined);
| ^
340 | done();
341 | });
342 | test('getColletionItemById should throw an error', async (done) => {
at expect (node_modules/expect/build/index.js:138:15)
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:339:5)
● testing bathingspots collection › testing delete fail for not existing element
expect(received).resolves.toBe()
Received promise rejected instead of resolved
Rejected to value: [RepositoryNotFoundError: No repository for "GenericInput" was found. Looks like this entity is not registered in current "default" connection?]
341 | });
342 | test('getColletionItemById should throw an error', async (done) => {
> 343 | expect(getGIWithRelations('100')).resolves.toBe(undefined);
| ^
344 | done();
345 | });
346 |
at expect (node_modules/expect/build/index.js:138:15)
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:343:5)
FAIL __tests__/routes/users/users.spots.post.integration.test.ts (62.459s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.spots.post.integration.test.ts:64
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.spots.post.integration.test.ts:60:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing bathingspots post for a specific user › should fail due to missing isPublic values
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should fail due to wrong isPublic type
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should fail due to wrong user id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should fail due to wrong user role
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should fail due to wrong user role
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.post.integration.test.ts:158:18)
● testing bathingspots post for a specific user › should add bathingspot to user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should add bathingspot to user
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.post.integration.test.ts:181:22)
● testing bathingspots post for a specific user › should post image reference to spot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should post image reference to spot
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
226 | .send({ url: 'http://placekitten.com/1080/540' })
227 | .set(headers);
> 228 | expect(res.status).toBe(201);
| ^
229 | done();
230 | });
231 | test.skip('should post image to spot', async (done) => {
at Object.test (__tests__/routes/users/users.spots.post.integration.test.ts:228:24)
● testing bathingspots post for a specific user › should post image to spot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
FAIL __tests__/request-error.test.ts (32.643s)
● testing missing db connection › should be 500 on test route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should throw an error on test route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route getUsers
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route getUser id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route getUsers id bathingspots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 route getUsers id bathingspot id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 route post user id bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 route put user id bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 route delete user id bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route post new user due to missing connection
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route post new user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route post new user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on put user by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on delete user by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route get all bathingspots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 get bathingspot by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 404 post bathingspot by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 get regions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 get regions by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 put regions by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 post regions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 delete region by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 404 to get collection foo
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 404 to get collection foo
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
FAIL __tests__/routes/users/users.spots.put.integration.test.ts (61.572s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.spots.put.integration.test.ts:60
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.spots.put.integration.test.ts:56:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing users/bathingspot PUT › should fail due to wrong id of a bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/bathingspot PUT › should fail due to wrong id of a bathingspot
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.put.integration.test.ts:85:22)
● testing users/bathingspot PUT › should change the name of a bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/bathingspot PUT › should change the name of a bathingspot
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.put.integration.test.ts:106:22)
● testing users/bathingspot PUT › should set all the fields of a bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/bathingspot PUT › should set all the fields of a bathingspot
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.put.integration.test.ts:140:22)
● testing users/bathingspot PUT › should reject the change due to wrong fields but present an example
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/bathingspot PUT › should reject the change due to wrong fields but present an example
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.put.integration.test.ts:173:22)
FAIL __tests__/routes/users/users.spots.get.integration.test.ts (61.891s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.spots.get.integration.test.ts:58
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.spots.get.integration.test.ts:54:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing users/[:userId]/bathingspots/[:spotId] › should return at least an empty array of bathingspots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › should return at least an empty array of bathingspots
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:83:22)
● testing users/[:userId]/bathingspots/[:spotId] › user should have a bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › user should have a bathingspot
TypeError: Cannot read property '0' of undefined
92 |
93 | test('user should have a bathingspot', async (done) => {
> 94 | const userWithSpotsCount = await connections[0].manager
| ^
95 | .createQueryBuilder(User, 'user')
96 | .loadRelationCountAndMap('user.bathingspotCount', 'user.bathingspots')
97 | .getMany();
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:94:49)
● testing users/[:userId]/bathingspots/[:spotId] › user should have no bathingspot in region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › user should have no bathingspot in region
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
115 | .get(`/api/v1/users/2/bathingspots/${DefaultRegions.schleswigholstein}`)
116 | .set(headers);
> 117 | expect(res.status).toBe(200);
| ^
118 | expect(res.body.data.length).toBe(0);
119 | done();
120 | });
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:117:24)
● testing users/[:userId]/bathingspots/[:spotId] › user should have a bathingspot with id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › region should not exist
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › region should not exist
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:140:22)
● testing users/[:userId]/bathingspots/[:spotId] › user should have no bathingspot in region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › user should have no bathingspot in region
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:155:22)
● testing users/[:userId]/bathingspots/[:spotId] › should fail due to wrong user id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › should fail due to wrong user id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 200
175 | .set(headers);
176 |
> 177 | expect(res.status).toBe(404);
| ^
178 | expect(res.body.data).toBeUndefined();
179 | expect(res.body.success).toBe(false);
180 | done();
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:177:24)
● testing users/[:userId]/bathingspots/[:spotId] › should fail due to wrong bathingspot id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › should fail due to wrong bathingspot id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
184 | .get(`/api/v1/users/${2}/bathingspots/${10000}`)
185 | .set(headers);
> 186 | expect(res.status).toBe(404);
| ^
187 | expect(res.body.data).toBeUndefined();
188 | expect(res.body.success).toBe(false);
189 | done();
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:186:24)
FAIL __tests__/routes/regions/region.integration.test.ts (61.933s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/regions/region.integration.test.ts:59
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/regions/region.integration.test.ts:55:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing regions api › should get all regions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should get all regions
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
85 | .get(`/api/v1/regions`)
86 | .set(headers);
> 87 | expect(res.status).toBe(HttpCodes.success);
| ^
88 | expect(res.body.success).toBe(true);
89 | expect(Array.isArray(res.body.data)).toBe(true);
90 | expect(res.body.data[0].id !== undefined).toBe(true);
at Object.test (__tests__/routes/regions/region.integration.test.ts:87:24)
● testing regions api › should post a new region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should post a new region
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
102 | .set(headers);
103 |
> 104 | expect(res.status).toBe(HttpCodes.successCreated);
| ^
105 |
106 | expect(res.body.success).toBe(true);
107 | expect(Array.isArray(res.body.data)).toBe(true);
at Object.test (__tests__/routes/regions/region.integration.test.ts:104:24)
● testing regions api › should update a region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should update a region
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 404
123 | `/api/v1/regions/${region.id}`,
124 | );
> 125 | expect(res.status).toBe(HttpCodes.successCreated);
| ^
126 | // console.log(res.body);
127 | expect(Array.isArray(res.body.data)).toBe(true);
128 | expect(res.body.data[0].displayName).toEqual('Niedersachsen');
at Object.test (__tests__/routes/regions/region.integration.test.ts:125:24)
● testing regions api › should fail to update due to wrong id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should fail to update due to wrong id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
139 | })
140 | .set(headers);
> 141 | expect(res.status).toBe(HttpCodes.badRequestNotFound);
| ^
142 | // console.log(res.body);
143 | expect(res.body.success).toBe(false);
144 | // console.log(doubeCheckRegion.body);
at Object.test (__tests__/routes/regions/region.integration.test.ts:141:24)
● testing regions api › should fail to delete due to wrong id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should fail to delete due to wrong id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
149 | .delete(`/api/v1/regions/${1000}`)
150 | .set(headers);
> 151 | expect(res.status).toBe(HttpCodes.badRequestNotFound);
| ^
152 | // console.log(res.body);
153 | expect(res.body.success).toBe(false);
154 | // console.log(doubeCheckRegion.body);
at Object.test (__tests__/routes/regions/region.integration.test.ts:151:24)
● testing regions api › should delete a region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should delete a region
TypeError: Cannot read property '0' of undefined
166 |
167 | const res = await request(app)
> 168 | .delete(`/api/v1/regions/${resCreate.body.data[0].id}`)
| ^
169 | .set(headers);
170 | // console.log(res.body);
171 | expect(res.status).toBe(HttpCodes.success);
at Object.test (__tests__/routes/regions/region.integration.test.ts:168:53)
FAIL __tests__/routes/users/users.spots.delete.integration.test.ts (61.337s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.spots.delete.integration.test.ts:61
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.spots.delete.integration.test.ts:57:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing users/[:userId]/bathingspots/[:spotId] delete › should fail due wrong spot id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] delete › should fail due wrong spot id
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.delete.integration.test.ts:86:22)
● testing users/[:userId]/bathingspots/[:spotId] delete › should fail due to missing force
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] delete › should fail due to missing force
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.delete.integration.test.ts:108:22)
● testing users/[:userId]/bathingspots/[:spotId] delete › should delete public bathingspot by using force
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] delete › should delete public bathingspot by using force
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.delete.integration.test.ts:133:22)
FAIL __tests__/routes/users/users.post.integration.test.ts (62.071s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.post.integration.test.ts:59
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.post.integration.test.ts:55:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing post users › add user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
93 | })
94 | .set(headers);
> 95 | expect(res.status).toBe(201);
| ^
96 | expect(res.body.success).toBe(true);
97 | done();
98 | });
at Object.test (__tests__/routes/users/users.post.integration.test.ts:95:24)
● testing post users › add user creator (should have a region set)
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user creator (should have a region set)
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
110 | })
111 | .set(headers);
> 112 | expect(res.status).toBe(201);
| ^
113 | expect(res.body.success).toBe(true);
114 | expect(Array.isArray(res.body.data)).toBe(true);
115 | done();
at Object.test (__tests__/routes/users/users.post.integration.test.ts:112:24)
● testing post users › add user shoud fail due to missing values
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing values
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
121 | .send({})
122 | .set(headers);
> 123 | expect(res.status).toBe(404);
| ^
124 | });
125 |
126 | test('add user shoud fail due to missing firstName', async (done) => {
at Object.test (__tests__/routes/users/users.post.integration.test.ts:123:24)
● testing post users › add user shoud fail due to missing firstName
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing firstName
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
134 | })
135 | .set(headers);
> 136 | expect(res.status).toBe(404);
| ^
137 | done();
138 | });
139 |
at Object.test (__tests__/routes/users/users.post.integration.test.ts:136:24)
● testing post users › add user shoud fail due to missing lastName
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing lastName
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
148 | })
149 | .set(headers);
> 150 | expect(res.status).toBe(404);
| ^
151 | });
152 | test('add user shoud fail due to missing email', async () => {
153 | expect.assertions(1);
at Object.test (__tests__/routes/users/users.post.integration.test.ts:150:24)
● testing post users › add user shoud fail due to missing email
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing email
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
160 | })
161 | .set(headers);
> 162 | expect(res.status).toBe(404);
| ^
163 | });
164 |
165 | test('add user shoud fail due to missing role', async () => {
at Object.test (__tests__/routes/users/users.post.integration.test.ts:162:24)
● testing post users › add user shoud fail due to missing role
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing role
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
173 | })
174 | .set(headers);
> 175 | expect(res.status).toBe(404);
| ^
176 | });
177 | });
178 |
at Object.test (__tests__/routes/users/users.post.integration.test.ts:175:24)
FAIL __tests__/routes/misc.integration.test.ts (61.522s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/misc.integration.test.ts:51
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/misc.integration.test.ts:47:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● misc functions that need a DB › misc functions that need a DB › should return a list of default regions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● misc functions that need a DB › misc functions that need a DB › should return a list of default regions
RepositoryNotFoundError: No repository for "Region" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at getNamesList (src/lib/utils/region-repo-helpers.ts:895:38)
at Object.<anonymous>.exports.getRegionsList (src/lib/utils/region-repo-helpers.ts:927:36)
at Object.test (__tests__/routes/misc.integration.test.ts:76:26)
● misc functions that need a DB › testing rmodel repo helpers › should return model or undefiend
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● misc functions that need a DB › testing rmodel repo helpers › should return model or undefiend
RepositoryNotFoundError: No repository for "Bathingspot" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/misc.integration.test.ts:89:21)
● misc functions that need a DB › testing rmodel repo helpers › should throw an error
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● misc functions that need a DB › testing errors on repo helpers › should be catch error due to missing db
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● misc functions that need a DB › testing errors on repo helpers › should be catch error due to missing db
expect(received).toEqual(expected) // deep equality
- Expected
+ Received
- Connection "default" was not found.
+ expect(received).toBe(expected) // Object.is equality
+
+ Expected: undefined
+ Received: [RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?]
120 | })
121 | .catch((err) => {
> 122 | expect(err.message).toEqual('Connection "default" was not found.');
| ^
123 | done();
124 | });
125 | });
at user_repo_helpers_1.getUserByIdWithSpots.then.catch (__tests__/routes/misc.integration.test.ts:122:31)
FAIL __tests__/routes/users/users.put.integration.test.ts (61.858s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.put.integration.test.ts:57
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.put.integration.test.ts:53:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing put users › update user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing put users › update user
TypeError: Cannot read property 'length' of undefined
83 | .get('/api/v1/users')
84 | .set(headers);
> 85 | const id = usersres.body.data[usersres.body.data.length - 1].id;
| ^
86 | const res = await request(app)
87 | .put(`/api/v1/users/${id}`)
88 | .send({
at Object.test (__tests__/routes/users/users.put.integration.test.ts:85:54)
● testing put users › update user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing put users › user fail due to undefined user id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing put users › user fail due to undefined user id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
135 | .put(`/api/v1/users/${1000}`)
136 | .set(headers);
> 137 | expect(res.status).toBe(404);
| ^
138 | expect(res.body.success).toBe(false);
139 | done();
140 | });
at Object.test (__tests__/routes/users/users.put.integration.test.ts:137:24)
● testing put users › user fail due to wrong route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
PASS __tests__/routes/routes.integration.test.ts
FAIL __tests__/routes/users/users.delete.integration.test.ts (61.614s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.delete.integration.test.ts:51
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.delete.integration.test.ts:47:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing delete users › should delete a users
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › should delete a users
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.delete.integration.test.ts:76:22)
● testing delete users › delete user should fail due to missing id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › delete user should fail due to wrong id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › delete user should fail due to wrong id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
104 | .delete(`/api/v1/users/${10000000}`)
105 | .set(headers);
> 106 | expect(res.status).toBe(404);
| ^
107 | done();
108 | });
109 |
at Object.test (__tests__/routes/users/users.delete.integration.test.ts:106:24)
● testing delete users › should delete user even if he has spots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › should delete user even if he has spots
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.delete.integration.test.ts:111:22)
● testing delete users › should fail. Can't delete protected user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › should fail. Can't delete protected user
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.delete.integration.test.ts:124:22)
FAIL __tests__/routes/bathingspots/bathingspots.integration.test.ts (61.46s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/bathingspots/bathingspots.integration.test.ts:58
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/bathingspots/bathingspots.integration.test.ts:54:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing public bathingspots › route should fail due to wrong route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › route get bathingspots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › route get bathingspots
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
89 | test('route get bathingspots', async (done) => {
90 | const res = await request(app).get('/api/v1/bathingspots');
> 91 | expect(res.status).toBe(200);
| ^
92 | expect(Array.isArray(res.body.data)).toBe(true);
93 | expect(res.body.success).toBe(true);
94 | done();
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:91:24)
● testing public bathingspots › route get bathingspot by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › route get bathingspot by id
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
98 | // expect.assertions(2);
99 | const res = await request(app).get('/api/v1/bathingspots/1');
> 100 | expect(res.status).toBe(200);
| ^
101 | expect(res.body.success).toBe(true);
102 | expect(Array.isArray(res.body.data)).toBe(true);
103 | done();
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:100:24)
● testing public bathingspots › route get single bathingspot should fail due to worng id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › route get single bathingspot should fail due to worng id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
107 | // expect.assertions(2);
108 | const res = await request(app).get(`/api/v1/bathingspots/${100000}`);
> 109 | expect(res.status).toBe(404);
| ^
110 | expect(res.body.success).toBe(false);
111 | done();
112 | });
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:109:24)
● testing public bathingspots › should fail due to wrong spot region id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › should fail due to wrong spot region id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
113 | test('should fail due to wrong spot region id', async (done) => {
114 | const res = await request(app).get(`/api/v1/bathingspots/foo`);
> 115 | expect(res.status).toBe(HttpCodes.badRequestNotFound);
| ^
116 | expect(res.body.success).toBe(false);
117 | done();
118 | });
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:115:24)
● testing public bathingspots › should return empty spot array
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › should return empty spot array
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
121 | `/api/v1/bathingspots/${DefaultRegions.schleswigholstein}`,
122 | );
> 123 | expect(res.status).toBe(HttpCodes.success);
| ^
124 | expect(res.body.success).toBe(true);
125 | expect(res.body.data.length).toBe(0);
126 | done();
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:123:24)
FAIL __tests__/routes/users/users.get.integration.test.ts (61.842s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/routes/users/users.get.integration.test.ts:60
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/routes/users/users.get.integration.test.ts:56:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing get users › route should fail due to wrong route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get users
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get users
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
83 | .get('/api/v1/users')
84 | .set(headers);
> 85 | expect(res.status).toBe(200);
| ^
86 | expect(Array.isArray(res.body.data)).toBe(true);
87 | // expect(res.body[0]).toHaveProperty('email');
88 | // expect(res.body[0]).toHaveProperty('firstName');
at Object.test (__tests__/routes/users/users.get.integration.test.ts:85:24)
● testing get users › route get users by auth0id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get users by auth0id
RepositoryNotFoundError: No repository for "user" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.get.integration.test.ts:95:18)
● testing get users › route get user by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get user by id
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
122 | .get('/api/v1/users/1')
123 | .set(headers);
> 124 | expect(res.status).toBe(200);
| ^
125 | expect(Array.isArray(res.body.data)).toBe(true);
126 | done();
127 | });
at Object.test (__tests__/routes/users/users.get.integration.test.ts:124:24)
● testing get users › route get user by id
expect.assertions(2)
Expected two assertions to be called but received one assertion call.
118 | });
119 | test('route get user by id', async (done) => {
> 120 | expect.assertions(2);
| ^
121 | const res = await request(app)
122 | .get('/api/v1/users/1')
123 | .set(headers);
at Object.test (__tests__/routes/users/users.get.integration.test.ts:120:12)
● testing get users › route get user should fail due to worng id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get user should fail due to worng id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
132 | .get(`/api/v1/users/${100000}`)
133 | .set(headers);
> 134 | expect(res.status).toBe(404);
| ^
135 | expect(res.body.success).toBe(false);
136 | done();
137 | });
at Object.test (__tests__/routes/users/users.get.integration.test.ts:134:24)
● testing get users › route get user should fail due to worng id
expect.assertions(2)
Expected two assertions to be called but received one assertion call.
128 |
129 | test('route get user should fail due to worng id', async (done) => {
> 130 | expect.assertions(2);
| ^
131 | const res = await request(app)
132 | .get(`/api/v1/users/${100000}`)
133 | .set(headers);
at Object.test (__tests__/routes/users/users.get.integration.test.ts:130:12)
FAIL __tests__/entities/bathingspots.test.ts (61.504s)
● Console
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
Error: Entity metadata for BathingspotModel#plotfiles was not found. Check if you specified a correct entity object and if it's connected in the connection options.
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:651:23
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.computeInverseProperties (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:646:34)
at /home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:56
at Array.forEach (<anonymous>)
at EntityMetadataBuilder.Object.<anonymous>.EntityMetadataBuilder.build (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/metadata-builder/EntityMetadataBuilder.ts:115:25)
at ConnectionMetadataBuilder.Object.<anonymous>.ConnectionMetadataBuilder.buildEntityMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/ConnectionMetadataBuilder.ts:66:111)
at Connection.Object.<anonymous>.Connection.buildMetadatas (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:513:59)
at Connection.<anonymous> (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/src/connection/Connection.ts:190:18)
at step (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/tslib/tslib.js:136:27)
console.warn __tests__/entities/bathingspots.test.ts:51
Cannot read property 'map' of undefined
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
TypeError: Cannot read property 'map' of undefined
at Object.reloadTestingDatabases (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/test-utils/index.ts:145:17)
at Object.afterAll (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/__tests__/entities/bathingspots.test.ts:47:13)
at resolve (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
at new Promise (<anonymous>)
at mapper (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at promise.then (/home/travis/build/technologiestiftung/flusshygiene-postgres-api/node_modules/jest-jasmine2/build/queueRunner.js:73:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
● testing get bathingspots › test bathingspot import helpers measurements
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get bathingspots › test bathingspot import helpers measurements
RepositoryNotFoundError: No repository for "BathingspotMeasurement" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.<anonymous>.exports.createMeasurementWithValues (src/lib/utils/measurement-helpers.ts:190:38)
at Object.test (__tests__/entities/bathingspots.test.ts:76:31)
● testing get bathingspots › test bathingspot import helpers prediction
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get bathingspots › test bathingspot import helpers prediction
RepositoryNotFoundError: No repository for "BathingspotPrediction" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.<anonymous>.exports.createPredictionWithValues (src/lib/utils/predictions-helpers.ts:190:39)
at Object.test (__tests__/entities/bathingspots.test.ts:81:31)
PASS __tests__/utils.test.ts
PASS __tests__/simple-routes.test.ts
PASS __tests__/index.test.ts
PASS __tests__/server.test.ts
PASS __tests__/app.test.ts
-----------------------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-----------------------------------------------|----------|----------|----------|----------|-------------------|
All files | 51.33 | 19.8 | 59.62 | 50.45 | |
lib | 100 | 100 | 100 | 100 | |
auth.ts | 100 | 100 | 100 | 100 | |
routes.ts | 100 | 100 | 100 | 100 | |
s3.ts | 100 | 100 | 100 | 100 | |
version.ts | 100 | 100 | 100 | 100 | |
lib/common | 100 | 100 | 100 | 100 | |
index.ts | 100 | 100 | 100 | 100 | |
lib/messages | 100 | 100 | 100 | 100 | |
errors.ts | 100 | 100 | 100 | 100 | |
index.ts | 100 | 100 | 100 | 100 | |
success.ts | 100 | 100 | 100 | 100 | |
suggestions.ts | 100 | 100 | 100 | 100 | |
lib/middleware | 0 | 0 | 0 | 0 | |
user-spot-check.ts | 0 | 0 | 0 | 0 |... 18,19,20,22,25 |
lib/request-handlers | 66.04 | 55.56 | 56.25 | 66.04 | |
defaults.ts | 100 | 100 | 100 | 100 | |
responders.ts | 58.14 | 55.56 | 46.15 | 58.14 |... 79,180,182,183 |
lib/request-handlers/bathingspots | 50 | 10.84 | 70 | 48.39 | |
delete.ts | 36.36 | 0 | 0 | 36.36 |... 31,32,34,37,40 |
get.ts | 60.78 | 20.83 | 100 | 60.78 |... 17,118,120,126 |
index.ts | 100 | 100 | 100 | 100 | |
post.ts | 55.56 | 33.33 | 100 | 55.56 |... 53,54,56,63,71 |
public-get.ts | 38.46 | 0 | 75 | 39.22 |... 13,114,116,122 |
put.ts | 36.67 | 0 | 0 | 36.67 |... 50,51,57,60,63 |
lib/request-handlers/bathingspots/collections | 32.39 | 10.89 | 37.5 | 32.39 | |
collections.ts | 100 | 100 | 100 | 100 | |
delete.ts | 73.08 | 33.33 | 100 | 73.08 |... 48,49,50,51,58 |
get.ts | 50 | 22.22 | 66.67 | 50 |... 01,127,136,160 |
post-file.ts | 24.44 | 3.7 | 14.29 | 24.44 |... 87,189,191,198 |
post.ts | 22.38 | 8 | 40 | 22.38 |... 42,344,347,348 |
lib/request-handlers/regions | 66.25 | 0 | 100 | 64 | |
delete.ts | 62.5 | 0 | 100 | 62.5 | 16,17,18,19,21,22 |
get.ts | 81.25 | 100 | 100 | 81.25 | 15,28,29 |
index.ts | 100 | 100 | 100 | 100 | |
post.ts | 52.38 | 0 | 100 | 52.38 |... 23,38,39,40,41 |
put.ts | 55.56 | 0 | 100 | 55.56 |... 19,21,23,24,25 |
lib/request-handlers/users | 49.57 | 8.33 | 62.5 | 47.79 | |
delete.ts | 30.77 | 0 | 50 | 30.77 |... 51,54,55,58,59 |
get.ts | 78.95 | 25 | 100 | 78.95 | 26,27,29,50 |
index.ts | 100 | 100 | 100 | 100 | |
post.ts | 38.89 | 16.67 | 50 | 38.89 |... 78,82,83,87,89 |
put.ts | 44.44 | 0 | 50 | 44.44 |... 41,42,45,46,52 |
lib/utils | 48.31 | 20 | 52.63 | 47.84 | |
collection-repo-helpers.ts | 42.86 | 0 | 100 | 42.86 |... 06,108,110,112 |
get-entity-fields.ts | 53.33 | 33.33 | 37.5 | 53.33 |... 40,41,43,44,49 |
get-geojson-geometry.ts | 100 | 100 | 100 | 100 | |
get-matching-values-from-request.ts | 16.67 | 100 | 0 | 16.67 | 4,5,7,8,10 |
get-properties-values-generic.ts | 100 | 100 | 100 | 100 | |
get-verify-region.ts | 30 | 0 | 0 | 30 | 5,7,8,9,10,13,15 |
index.ts | 100 | 100 | 100 | 100 | |
is-object.ts | 100 | 100 | 100 | 100 | |
measurement-helpers.ts | 66.67 | 100 | 100 | 66.67 | 10,12,13 |
predictions-helpers.ts | 66.67 | 100 | 100 | 66.67 | 10,12,13 |
region-repo-helpers.ts | 42.11 | 0 | 42.86 | 43.24 |... 57,59,61,69,70 |
rmodel-repo-helpers.ts | 66.67 | 100 | 100 | 66.67 | 9,14,16 |
spot-repo-helpers.ts | 38.64 | 0 | 50 | 38.64 |... 38,139,146,148 |
user-repo-helpers.ts | 40 | 100 | 50 | 40 |... 54,55,58,59,61 |
-----------------------------------------------|----------|----------|----------|----------|-------------------|
Jest: "global" coverage threshold for statements (75%) not met: 51.33%
Jest: "global" coverage threshold for branches (65%) not met: 19.8%
Jest: "global" coverage threshold for lines (75%) not met: 50.45%
Jest: "global" coverage threshold for functions (75%) not met: 59.62%
Summary of all failing tests
FAIL __tests__/routes/users/users.spots.collection.test.ts (67.883s)
● Testing all collection tyoe › should fail due to wrong user id route GET user by id spot by id predictions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong user id route GET user by id spot by id predictions
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 200
97 | .get('/api/v1/users/5/bathingspots/1/predictions')
98 | .set(headers);
> 99 | expect(res.status).toBe(404);
| ^
100 | expect(Array.isArray(res.body.success)).toBe(false);
101 | done();
102 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:99:24)
● Testing all collection tyoe › should fail due to wrong spot id route GET user by id spot by id predictions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong spot id route GET user by id spot by id predictions
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 200
106 | .get('/api/v1/users/1/bathingspots/1000/predictions')
107 | .set(headers);
> 108 | expect(res.status).toBe(404);
| ^
109 | expect(Array.isArray(res.body.success)).toBe(false);
110 | done();
111 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:108:24)
● Testing all collection tyoe › should fail due to wrong collection id/name rain intead of rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong collection id/name rain intead of rains
TypeError: Cannot read property '0' of undefined
118 | // console.log(spotRes.body);
119 | const rainRes = await request(app)
> 120 | .post(`/api/v1/users/1/bathingspots/${spotRes.body.data[0].id}/rains`)
| ^
121 | .send({
122 | date: '08-Jan-1999',
123 | dateTime: '05:23:42',
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:120:62)
● Testing all collection tyoe › should fail due to wrong collection id/name
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong collection id/name
TypeError: Cannot read property '0' of undefined
142 | // console.log(spotRes.body);
143 | const rainRes = await request(app)
> 144 | .post(`/api/v1/users/1/bathingspots/${spotRes.body.data[0].id}/rains`)
| ^
145 | .send({
146 | date: '08-Jan-1999',
147 | dateTime: '05:23:42',
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:144:62)
● Testing all collection tyoe › should pass GET collection item
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should pass GET collection item
TypeError: Cannot read property '0' of undefined
168 | // console.log(spotRes.body);
169 | const rainRes = await request(app)
> 170 | .post(`/api/v1/users/1/bathingspots/${spotRes.body.data[0].id}/rains`)
| ^
171 | .send({
172 | date: '08-Jan-1999',
173 | dateTime: '05:23:42',
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:170:62)
● Testing all collection tyoe › should pass GET genericInput Measurement
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong spot ID
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail due to wrong spot ID
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
232 | .set(headers);
233 | // console.log(res.body);
> 234 | expect(res.status).toBe(404);
| ^
235 | expect(res.body.success).toBe(false);
236 | done();
237 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:234:24)
● Testing all collection tyoe › should fail GET collection item by wrong id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › should fail GET collection item by wrong id
TypeError: Cannot read property '0' of undefined
244 | // console.log(spotRes.body);
245 | const rainRes = await request(app)
> 246 | .post(`/api/v1/users/1/bathingspots/${spotRes.body.data[0].id}/rains`)
| ^
247 | .send({
248 | date: '08-Jan-1999',
249 | dateTime: '05:23:42',
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:246:62)
● Testing all collection tyoe › route GET user by id spot by id predictions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id predictions
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
275 | .set(headers);
276 | expect(res.status).toBe(200);
> 277 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
278 | done();
279 | });
280 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:277:42)
● Testing all collection tyoe › route GET user by id spot by id measurements
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id measurements
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
284 | .set(headers);
285 | expect(res.status).toBe(200);
> 286 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
287 | done();
288 | });
289 | test('route GET user by id spot by id discharges', async (done) => {
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:286:42)
● Testing all collection tyoe › route GET user by id spot by id discharges
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id discharges
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
292 | .set(headers);
293 | expect(res.status).toBe(200);
> 294 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
295 | done();
296 | });
297 | test('route GET user by id spot by id rains', async (done) => {
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:294:42)
● Testing all collection tyoe › route GET user by id spot by id rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id rains
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
300 | .set(headers);
301 | expect(res.status).toBe(200);
> 302 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
303 | done();
304 | });
305 | test('route GET user by id spot by id globalIrradiances', async (done) => {
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:302:42)
● Testing all collection tyoe › route GET user by id spot by id globalIrradiances
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id globalIrradiances
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
308 | .set(headers);
309 | expect(res.status).toBe(200);
> 310 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
311 | done();
312 | });
313 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:310:42)
● Testing all collection tyoe › route GET user by id spot by id models
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id models
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
317 | .set(headers);
318 | expect(res.status).toBe(200);
> 319 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
320 | done();
321 | });
322 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:319:42)
● Testing all collection tyoe › route GET user by id spot by id models should not have field rmodel
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id models should not have field rmodel
TypeError: Cannot read property '0' of undefined
331 | .set(headers);
332 | expect(res.status).toBe(200);
> 333 | expect(res.body.data[0].rmodel).toBeUndefined();
| ^
334 | done();
335 | });
336 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:333:25)
● Testing all collection tyoe › route GET user by id spot by id purificationPlants
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id purificationPlants
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
340 | .set(headers);
341 | expect(res.status).toBe(200);
> 342 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
343 | done();
344 | });
345 | test('route GET user by id spot by id genericInputs', async (done) => {
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:342:42)
● Testing all collection tyoe › route GET user by id spot by id genericInputs
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route GET user by id spot by id genericInputs
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
348 | .set(headers);
349 | expect(res.status).toBe(200);
> 350 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
351 | done();
352 | });
353 |
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:350:42)
● Testing all collection tyoe › route POST user by id spot by id predictions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id predictions
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
375 | })
376 | .set(headers);
> 377 | expect(res.status).toBe(201);
| ^
378 | expect(Array.isArray(res.body.data)).toBe(true);
379 | done();
380 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:377:24)
● Testing all collection tyoe › route POST user by id spot by id measurements
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id measurements
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
403 | })
404 | .set(headers);
> 405 | expect(res.status).toBe(201);
| ^
406 | expect(Array.isArray(res.body.data)).toBe(true);
407 | done();
408 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:405:24)
● Testing all collection tyoe › route POST user by id spot by id discharges
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id discharges
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
417 | })
418 | .set(headers);
> 419 | expect(res.status).toBe(201);
| ^
420 | expect(Array.isArray(res.body.data)).toBe(true);
421 | done();
422 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:419:24)
● Testing all collection tyoe › route POST user by id spot by id rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id rains
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
431 | })
432 | .set(headers);
> 433 | expect(res.status).toBe(201);
| ^
434 | expect(Array.isArray(res.body.data)).toBe(true);
435 | done();
436 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:433:24)
● Testing all collection tyoe › route POST user by id spot by id globalIrradiances
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id globalIrradiances
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
445 | })
446 | .set(headers);
> 447 | expect(res.status).toBe(201);
| ^
448 | expect(Array.isArray(res.body.data)).toBe(true);
449 | done();
450 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:447:24)
● Testing all collection tyoe › route POST user by id spot by id models
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id models
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
457 | })
458 | .set(headers);
> 459 | expect(res.status).toBe(201);
| ^
460 | expect(Array.isArray(res.body.data)).toBe(true);
461 | done();
462 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:459:24)
● Testing all collection tyoe › route POST user by id spot by id purificationPlants
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id purificationPlants
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
468 | })
469 | .set(headers);
> 470 | expect(res.status).toBe(201);
| ^
471 | expect(Array.isArray(res.body.data)).toBe(true);
472 | done();
473 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:470:24)
● Testing all collection tyoe › route POST user by id spot by id genericInputs
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Testing all collection tyoe › route POST user by id spot by id genericInputs
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
479 | })
480 | .set(headers);
> 481 | expect(res.status).toBe(201);
| ^
482 | expect(Array.isArray(res.body.data)).toBe(true);
483 | done();
484 | });
at Object.test (__tests__/routes/users/users.spots.collection.test.ts:481:24)
FAIL __tests__/routes/bathingspots/bathingspots-collection.integration.test.ts (62.591s)
● testing bathingspots collection › post collection item should expect array or object
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › post collection item should expect array or object
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
128 | .send(arr)
129 | .set(headers);
> 130 | expect(res.status).toBe(201);
| ^
131 | done();
132 | });
133 |
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:130:24)
● testing bathingspots collection › route POST users bathingspots collection rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route POST users bathingspots collection rains
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
143 | .send(obj)
144 | .set(headers);
> 145 | expect(res.status).toBe(201);
| ^
146 | expect(Array.isArray(res.body.data)).toBe(true);
147 | expect(res.body.success).toBe(true);
148 | expect(res.body.data[0].comment).toBe(obj.comment);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:145:24)
● testing bathingspots collection › route DELETE users bathingspots collection rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route DELETE users bathingspots collection rains
TypeError: Cannot read property '0' of undefined
161 | .set(headers);
162 | const res = await request(app)
> 163 | .delete(`/api/v1/users/1/bathingspots/1/rains/${resPost.body.data[0].id}`)
| ^
164 | .set(headers);
165 | expect(res.status).toBe(200);
166 | expect(Array.isArray(res.body.data)).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:163:72)
● testing bathingspots collection › route POST users bathingspots collection genericInputs measurements
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route POST users bathingspots collection genericInputs measurements
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
185 | .send(obj)
186 | .set(headers);
> 187 | expect(res.status).toBe(201);
| ^
188 | expect(Array.isArray(res.body.data)).toBe(true);
189 | expect(res.body.success).toBe(true);
190 | expect(res.body.data[0].comment).toBe(obj.comment);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:187:24)
● testing bathingspots collection › route BULK POST users bathingspot collection genericInputs measurement
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route BULK POST users bathingspot collection genericInputs measurement
TypeError: Cannot read property '0' of undefined
214 | const res = await request(app)
215 | .post(
> 216 | `/api/v1/users/1/bathingspots/1/genericInputs/${resCreate.body.data[0].id}/measurements`,
| ^
217 | )
218 | .send(arr)
219 | .set(headers);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:216:76)
● testing bathingspots collection › getColletionItemById should return specific entitiy GenericInput
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy GenericInput
TypeError: Cannot read property '0' of undefined
232 | .set(headers);
233 | const entity = await getColletionItemById(
> 234 | res.body.data[0].id,
| ^
235 | 'GenericInput',
236 | );
237 | expect(entity instanceof GenericInput).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:234:20)
● testing bathingspots collection › getColletionItemById should return specific entitiy PurificationPlant
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy PurificationPlant
TypeError: Cannot read property '0' of undefined
244 | .set(headers);
245 | const entity = await getColletionItemById(
> 246 | res.body.data[0].id,
| ^
247 | 'PurificationPlant',
248 | );
249 | expect(entity instanceof PurificationPlant).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:246:20)
● testing bathingspots collection › getColletionItemById should return specific entitiy Discharge
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy Discharge
TypeError: Cannot read property '0' of undefined
256 | .send({ dateTime: '12:00:00', date: '2019-12-31', value: 1 })
257 | .set(headers);
> 258 | const entity = await getColletionItemById(res.body.data[0].id, 'Discharge');
| ^
259 | expect(entity instanceof Discharge).toBe(true);
260 | done();
261 | });
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:258:60)
● testing bathingspots collection › getColletionItemById should return specific entitiy GlobalIrradiance
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy GlobalIrradiance
TypeError: Cannot read property '0' of undefined
267 | .set(headers);
268 | const entity = await getColletionItemById(
> 269 | res.body.data[0].id,
| ^
270 | 'GlobalIrradiance',
271 | );
272 | expect(entity instanceof GlobalIrradiance).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:269:20)
● testing bathingspots collection › route get users bathingspots collection rains
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › route get users bathingspots collection rains
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
279 | .set(headers);
280 | expect(res.status).toBe(200);
> 281 | expect(Array.isArray(res.body.data)).toBe(true);
| ^
282 | expect(res.body.success).toBe(true);
283 | done();
284 | });
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:281:42)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotMeasurement
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotMeasurement
TypeError: Cannot read property '0' of undefined
290 | .set(headers);
291 | const entity = await getColletionItemById(
> 292 | res.body.data[0].id,
| ^
293 | 'BathingspotMeasurement',
294 | );
295 | expect(entity instanceof BathingspotMeasurement).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:292:20)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotModel
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotModel
TypeError: Cannot read property '0' of undefined
302 | .set(headers);
303 | const entity = await getColletionItemById(
> 304 | res.body.data[0].id,
| ^
305 | 'BathingspotModel',
306 | );
307 | expect(entity instanceof BathingspotModel).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:304:20)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotPrediction
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return specific entitiy BathingspotPrediction
TypeError: Cannot read property '0' of undefined
319 | .set(headers);
320 | const entity = await getColletionItemById(
> 321 | res.body.data[0].id,
| ^
322 | 'BathingspotPrediction',
323 | );
324 | expect(entity instanceof BathingspotPrediction).toBe(true);
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:321:20)
● testing bathingspots collection › getColletionItemById should throw an error
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should return undefiend
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › getColletionItemById should throw an error
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › testing delete fail for not existing element
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots collection › testing delete fail for not existing element
expect(received).resolves.toBe()
Received promise rejected instead of resolved
Rejected to value: [RepositoryNotFoundError: No repository for "PurificationPlant" was found. Looks like this entity is not registered in current "default" connection?]
337 | });
338 | test('getColletionItemById should return undefiend', async (done) => {
> 339 | expect(getPPlantWithRelations('100')).resolves.toBe(undefined);
| ^
340 | done();
341 | });
342 | test('getColletionItemById should throw an error', async (done) => {
at expect (node_modules/expect/build/index.js:138:15)
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:339:5)
● testing bathingspots collection › testing delete fail for not existing element
expect(received).resolves.toBe()
Received promise rejected instead of resolved
Rejected to value: [RepositoryNotFoundError: No repository for "GenericInput" was found. Looks like this entity is not registered in current "default" connection?]
341 | });
342 | test('getColletionItemById should throw an error', async (done) => {
> 343 | expect(getGIWithRelations('100')).resolves.toBe(undefined);
| ^
344 | done();
345 | });
346 |
at expect (node_modules/expect/build/index.js:138:15)
at Object.test (__tests__/routes/bathingspots/bathingspots-collection.integration.test.ts:343:5)
FAIL __tests__/routes/users/users.spots.post.integration.test.ts (62.459s)
● testing bathingspots post for a specific user › should fail due to missing isPublic values
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should fail due to wrong isPublic type
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should fail due to wrong user id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should fail due to wrong user role
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should fail due to wrong user role
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.post.integration.test.ts:158:18)
● testing bathingspots post for a specific user › should add bathingspot to user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should add bathingspot to user
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.post.integration.test.ts:181:22)
● testing bathingspots post for a specific user › should post image reference to spot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing bathingspots post for a specific user › should post image reference to spot
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
226 | .send({ url: 'http://placekitten.com/1080/540' })
227 | .set(headers);
> 228 | expect(res.status).toBe(201);
| ^
229 | done();
230 | });
231 | test.skip('should post image to spot', async (done) => {
at Object.test (__tests__/routes/users/users.spots.post.integration.test.ts:228:24)
● testing bathingspots post for a specific user › should post image to spot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
FAIL __tests__/request-error.test.ts (32.643s)
● testing missing db connection › should be 500 on test route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should throw an error on test route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route getUsers
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
��� testing missing db connection › should return 500 on route getUser id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route getUsers id bathingspots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 route getUsers id bathingspot id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 route post user id bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 route put user id bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 route delete user id bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route post new user due to missing connection
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route post new user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route post new user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on put user by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on delete user by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 on route get all bathingspots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 get bathingspot by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 404 post bathingspot by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 get regions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 get regions by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 put regions by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 post regions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 500 delete region by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 404 to get collection foo
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing missing db connection › should return 404 to get collection foo
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
FAIL __tests__/routes/users/users.spots.put.integration.test.ts (61.572s)
● testing users/bathingspot PUT › should fail due to wrong id of a bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/bathingspot PUT › should fail due to wrong id of a bathingspot
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.put.integration.test.ts:85:22)
● testing users/bathingspot PUT › should change the name of a bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/bathingspot PUT › should change the name of a bathingspot
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.put.integration.test.ts:106:22)
● testing users/bathingspot PUT › should set all the fields of a bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/bathingspot PUT › should set all the fields of a bathingspot
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.put.integration.test.ts:140:22)
● testing users/bathingspot PUT › should reject the change due to wrong fields but present an example
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/bathingspot PUT › should reject the change due to wrong fields but present an example
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.put.integration.test.ts:173:22)
FAIL __tests__/routes/users/users.spots.get.integration.test.ts (61.891s)
● testing users/[:userId]/bathingspots/[:spotId] › should return at least an empty array of bathingspots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › should return at least an empty array of bathingspots
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:83:22)
● testing users/[:userId]/bathingspots/[:spotId] › user should have a bathingspot
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › user should have a bathingspot
TypeError: Cannot read property '0' of undefined
92 |
93 | test('user should have a bathingspot', async (done) => {
> 94 | const userWithSpotsCount = await connections[0].manager
| ^
95 | .createQueryBuilder(User, 'user')
96 | .loadRelationCountAndMap('user.bathingspotCount', 'user.bathingspots')
97 | .getMany();
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:94:49)
● testing users/[:userId]/bathingspots/[:spotId] › user should have no bathingspot in region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › user should have no bathingspot in region
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
115 | .get(`/api/v1/users/2/bathingspots/${DefaultRegions.schleswigholstein}`)
116 | .set(headers);
> 117 | expect(res.status).toBe(200);
| ^
118 | expect(res.body.data.length).toBe(0);
119 | done();
120 | });
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:117:24)
● testing users/[:userId]/bathingspots/[:spotId] › user should have a bathingspot with id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › region should not exist
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › region should not exist
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:140:22)
● testing users/[:userId]/bathingspots/[:spotId] › user should have no bathingspot in region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › user should have no bathingspot in region
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:155:22)
● testing users/[:userId]/bathingspots/[:spotId] › should fail due to wrong user id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › should fail due to wrong user id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 200
175 | .set(headers);
176 |
> 177 | expect(res.status).toBe(404);
| ^
178 | expect(res.body.data).toBeUndefined();
179 | expect(res.body.success).toBe(false);
180 | done();
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:177:24)
● testing users/[:userId]/bathingspots/[:spotId] › should fail due to wrong bathingspot id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] › should fail due to wrong bathingspot id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
184 | .get(`/api/v1/users/${2}/bathingspots/${10000}`)
185 | .set(headers);
> 186 | expect(res.status).toBe(404);
| ^
187 | expect(res.body.data).toBeUndefined();
188 | expect(res.body.success).toBe(false);
189 | done();
at Object.test (__tests__/routes/users/users.spots.get.integration.test.ts:186:24)
FAIL __tests__/routes/regions/region.integration.test.ts (61.933s)
● testing regions api › should get all regions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should get all regions
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
85 | .get(`/api/v1/regions`)
86 | .set(headers);
> 87 | expect(res.status).toBe(HttpCodes.success);
| ^
88 | expect(res.body.success).toBe(true);
89 | expect(Array.isArray(res.body.data)).toBe(true);
90 | expect(res.body.data[0].id !== undefined).toBe(true);
at Object.test (__tests__/routes/regions/region.integration.test.ts:87:24)
● testing regions api › should post a new region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should post a new region
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
102 | .set(headers);
103 |
> 104 | expect(res.status).toBe(HttpCodes.successCreated);
| ^
105 |
106 | expect(res.body.success).toBe(true);
107 | expect(Array.isArray(res.body.data)).toBe(true);
at Object.test (__tests__/routes/regions/region.integration.test.ts:104:24)
● testing regions api › should update a region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should update a region
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 404
123 | `/api/v1/regions/${region.id}`,
124 | );
> 125 | expect(res.status).toBe(HttpCodes.successCreated);
| ^
126 | // console.log(res.body);
127 | expect(Array.isArray(res.body.data)).toBe(true);
128 | expect(res.body.data[0].displayName).toEqual('Niedersachsen');
at Object.test (__tests__/routes/regions/region.integration.test.ts:125:24)
● testing regions api › should fail to update due to wrong id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should fail to update due to wrong id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
139 | })
140 | .set(headers);
> 141 | expect(res.status).toBe(HttpCodes.badRequestNotFound);
| ^
142 | // console.log(res.body);
143 | expect(res.body.success).toBe(false);
144 | // console.log(doubeCheckRegion.body);
at Object.test (__tests__/routes/regions/region.integration.test.ts:141:24)
● testing regions api › should fail to delete due to wrong id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should fail to delete due to wrong id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
149 | .delete(`/api/v1/regions/${1000}`)
150 | .set(headers);
> 151 | expect(res.status).toBe(HttpCodes.badRequestNotFound);
| ^
152 | // console.log(res.body);
153 | expect(res.body.success).toBe(false);
154 | // console.log(doubeCheckRegion.body);
at Object.test (__tests__/routes/regions/region.integration.test.ts:151:24)
● testing regions api › should delete a region
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing regions api › should delete a region
TypeError: Cannot read property '0' of undefined
166 |
167 | const res = await request(app)
> 168 | .delete(`/api/v1/regions/${resCreate.body.data[0].id}`)
| ^
169 | .set(headers);
170 | // console.log(res.body);
171 | expect(res.status).toBe(HttpCodes.success);
at Object.test (__tests__/routes/regions/region.integration.test.ts:168:53)
FAIL __tests__/routes/users/users.spots.delete.integration.test.ts (61.337s)
● testing users/[:userId]/bathingspots/[:spotId] delete › should fail due wrong spot id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] delete › should fail due wrong spot id
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.delete.integration.test.ts:86:22)
● testing users/[:userId]/bathingspots/[:spotId] delete › should fail due to missing force
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] delete › should fail due to missing force
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.delete.integration.test.ts:108:22)
● testing users/[:userId]/bathingspots/[:spotId] delete › should delete public bathingspot by using force
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing users/[:userId]/bathingspots/[:spotId] delete › should delete public bathingspot by using force
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.spots.delete.integration.test.ts:133:22)
FAIL __tests__/routes/users/users.post.integration.test.ts (62.071s)
● testing post users › add user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
93 | })
94 | .set(headers);
> 95 | expect(res.status).toBe(201);
| ^
96 | expect(res.body.success).toBe(true);
97 | done();
98 | });
at Object.test (__tests__/routes/users/users.post.integration.test.ts:95:24)
● testing post users › add user creator (should have a region set)
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user creator (should have a region set)
expect(received).toBe(expected) // Object.is equality
Expected: 201
Received: 500
110 | })
111 | .set(headers);
> 112 | expect(res.status).toBe(201);
| ^
113 | expect(res.body.success).toBe(true);
114 | expect(Array.isArray(res.body.data)).toBe(true);
115 | done();
at Object.test (__tests__/routes/users/users.post.integration.test.ts:112:24)
● testing post users › add user shoud fail due to missing values
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing values
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
121 | .send({})
122 | .set(headers);
> 123 | expect(res.status).toBe(404);
| ^
124 | });
125 |
126 | test('add user shoud fail due to missing firstName', async (done) => {
at Object.test (__tests__/routes/users/users.post.integration.test.ts:123:24)
● testing post users › add user shoud fail due to missing firstName
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing firstName
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
134 | })
135 | .set(headers);
> 136 | expect(res.status).toBe(404);
| ^
137 | done();
138 | });
139 |
at Object.test (__tests__/routes/users/users.post.integration.test.ts:136:24)
● testing post users › add user shoud fail due to missing lastName
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing lastName
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
148 | })
149 | .set(headers);
> 150 | expect(res.status).toBe(404);
| ^
151 | });
152 | test('add user shoud fail due to missing email', async () => {
153 | expect.assertions(1);
at Object.test (__tests__/routes/users/users.post.integration.test.ts:150:24)
● testing post users › add user shoud fail due to missing email
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing email
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
160 | })
161 | .set(headers);
> 162 | expect(res.status).toBe(404);
| ^
163 | });
164 |
165 | test('add user shoud fail due to missing role', async () => {
at Object.test (__tests__/routes/users/users.post.integration.test.ts:162:24)
● testing post users › add user shoud fail due to missing role
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing post users › add user shoud fail due to missing role
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
173 | })
174 | .set(headers);
> 175 | expect(res.status).toBe(404);
| ^
176 | });
177 | });
178 |
at Object.test (__tests__/routes/users/users.post.integration.test.ts:175:24)
FAIL __tests__/routes/misc.integration.test.ts (61.522s)
● misc functions that need a DB › misc functions that need a DB › should return a list of default regions
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● misc functions that need a DB › misc functions that need a DB › should return a list of default regions
RepositoryNotFoundError: No repository for "Region" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at getNamesList (src/lib/utils/region-repo-helpers.ts:895:38)
at Object.<anonymous>.exports.getRegionsList (src/lib/utils/region-repo-helpers.ts:927:36)
at Object.test (__tests__/routes/misc.integration.test.ts:76:26)
● misc functions that need a DB › testing rmodel repo helpers › should return model or undefiend
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● misc functions that need a DB › testing rmodel repo helpers › should return model or undefiend
RepositoryNotFoundError: No repository for "Bathingspot" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/misc.integration.test.ts:89:21)
● misc functions that need a DB › testing rmodel repo helpers › should throw an error
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● misc functions that need a DB › testing errors on repo helpers › should be catch error due to missing db
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● misc functions that need a DB › testing errors on repo helpers › should be catch error due to missing db
expect(received).toEqual(expected) // deep equality
- Expected
+ Received
- Connection "default" was not found.
+ expect(received).toBe(expected) // Object.is equality
+
+ Expected: undefined
+ Received: [RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?]
120 | })
121 | .catch((err) => {
> 122 | expect(err.message).toEqual('Connection "default" was not found.');
| ^
123 | done();
124 | });
125 | });
at user_repo_helpers_1.getUserByIdWithSpots.then.catch (__tests__/routes/misc.integration.test.ts:122:31)
FAIL __tests__/routes/users/users.put.integration.test.ts (61.858s)
● testing put users › update user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing put users › update user
TypeError: Cannot read property 'length' of undefined
83 | .get('/api/v1/users')
84 | .set(headers);
> 85 | const id = usersres.body.data[usersres.body.data.length - 1].id;
| ^
86 | const res = await request(app)
87 | .put(`/api/v1/users/${id}`)
88 | .send({
at Object.test (__tests__/routes/users/users.put.integration.test.ts:85:54)
● testing put users › update user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing put users › user fail due to undefined user id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing put users › user fail due to undefined user id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
135 | .put(`/api/v1/users/${1000}`)
136 | .set(headers);
> 137 | expect(res.status).toBe(404);
| ^
138 | expect(res.body.success).toBe(false);
139 | done();
140 | });
at Object.test (__tests__/routes/users/users.put.integration.test.ts:137:24)
● testing put users › user fail due to wrong route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
FAIL __tests__/routes/users/users.delete.integration.test.ts (61.614s)
● testing delete users › should delete a users
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › should delete a users
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.delete.integration.test.ts:76:22)
● testing delete users › delete user should fail due to missing id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › delete user should fail due to wrong id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › delete user should fail due to wrong id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
104 | .delete(`/api/v1/users/${10000000}`)
105 | .set(headers);
> 106 | expect(res.status).toBe(404);
| ^
107 | done();
108 | });
109 |
at Object.test (__tests__/routes/users/users.delete.integration.test.ts:106:24)
● testing delete users › should delete user even if he has spots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › should delete user even if he has spots
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.delete.integration.test.ts:111:22)
● testing delete users › should fail. Can't delete protected user
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing delete users › should fail. Can't delete protected user
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.delete.integration.test.ts:124:22)
FAIL __tests__/routes/bathingspots/bathingspots.integration.test.ts (61.46s)
● testing public bathingspots › route should fail due to wrong route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › route get bathingspots
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › route get bathingspots
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
89 | test('route get bathingspots', async (done) => {
90 | const res = await request(app).get('/api/v1/bathingspots');
> 91 | expect(res.status).toBe(200);
| ^
92 | expect(Array.isArray(res.body.data)).toBe(true);
93 | expect(res.body.success).toBe(true);
94 | done();
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:91:24)
● testing public bathingspots › route get bathingspot by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › route get bathingspot by id
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
98 | // expect.assertions(2);
99 | const res = await request(app).get('/api/v1/bathingspots/1');
> 100 | expect(res.status).toBe(200);
| ^
101 | expect(res.body.success).toBe(true);
102 | expect(Array.isArray(res.body.data)).toBe(true);
103 | done();
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:100:24)
● testing public bathingspots › route get single bathingspot should fail due to worng id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › route get single bathingspot should fail due to worng id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
107 | // expect.assertions(2);
108 | const res = await request(app).get(`/api/v1/bathingspots/${100000}`);
> 109 | expect(res.status).toBe(404);
| ^
110 | expect(res.body.success).toBe(false);
111 | done();
112 | });
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:109:24)
● testing public bathingspots › should fail due to wrong spot region id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › should fail due to wrong spot region id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
113 | test('should fail due to wrong spot region id', async (done) => {
114 | const res = await request(app).get(`/api/v1/bathingspots/foo`);
> 115 | expect(res.status).toBe(HttpCodes.badRequestNotFound);
| ^
116 | expect(res.body.success).toBe(false);
117 | done();
118 | });
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:115:24)
● testing public bathingspots › should return empty spot array
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing public bathingspots › should return empty spot array
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
121 | `/api/v1/bathingspots/${DefaultRegions.schleswigholstein}`,
122 | );
> 123 | expect(res.status).toBe(HttpCodes.success);
| ^
124 | expect(res.body.success).toBe(true);
125 | expect(res.body.data.length).toBe(0);
126 | done();
at Object.test (__tests__/routes/bathingspots/bathingspots.integration.test.ts:123:24)
FAIL __tests__/routes/users/users.get.integration.test.ts (61.842s)
● testing get users › route should fail due to wrong route
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get users
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get users
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
83 | .get('/api/v1/users')
84 | .set(headers);
> 85 | expect(res.status).toBe(200);
| ^
86 | expect(Array.isArray(res.body.data)).toBe(true);
87 | // expect(res.body[0]).toHaveProperty('email');
88 | // expect(res.body[0]).toHaveProperty('firstName');
at Object.test (__tests__/routes/users/users.get.integration.test.ts:85:24)
● testing get users › route get users by auth0id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get users by auth0id
RepositoryNotFoundError: No repository for "user" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.test (__tests__/routes/users/users.get.integration.test.ts:95:18)
● testing get users › route get user by id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get user by id
expect(received).toBe(expected) // Object.is equality
Expected: 200
Received: 500
122 | .get('/api/v1/users/1')
123 | .set(headers);
> 124 | expect(res.status).toBe(200);
| ^
125 | expect(Array.isArray(res.body.data)).toBe(true);
126 | done();
127 | });
at Object.test (__tests__/routes/users/users.get.integration.test.ts:124:24)
● testing get users › route get user by id
expect.assertions(2)
Expected two assertions to be called but received one assertion call.
118 | });
119 | test('route get user by id', async (done) => {
> 120 | expect.assertions(2);
| ^
121 | const res = await request(app)
122 | .get('/api/v1/users/1')
123 | .set(headers);
at Object.test (__tests__/routes/users/users.get.integration.test.ts:120:12)
● testing get users › route get user should fail due to worng id
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get users › route get user should fail due to worng id
expect(received).toBe(expected) // Object.is equality
Expected: 404
Received: 500
132 | .get(`/api/v1/users/${100000}`)
133 | .set(headers);
> 134 | expect(res.status).toBe(404);
| ^
135 | expect(res.body.success).toBe(false);
136 | done();
137 | });
at Object.test (__tests__/routes/users/users.get.integration.test.ts:134:24)
● testing get users › route get user should fail due to worng id
expect.assertions(2)
Expected two assertions to be called but received one assertion call.
128 |
129 | test('route get user should fail due to worng id', async (done) => {
> 130 | expect.assertions(2);
| ^
131 | const res = await request(app)
132 | .get(`/api/v1/users/${100000}`)
133 | .set(headers);
at Object.test (__tests__/routes/users/users.get.integration.test.ts:130:12)
FAIL __tests__/entities/bathingspots.test.ts (61.504s)
● testing get bathingspots › test bathingspot import helpers measurements
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get bathingspots › test bathingspot import helpers measurements
RepositoryNotFoundError: No repository for "BathingspotMeasurement" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.<anonymous>.exports.createMeasurementWithValues (src/lib/utils/measurement-helpers.ts:190:38)
at Object.test (__tests__/entities/bathingspots.test.ts:76:31)
● testing get bathingspots › test bathingspot import helpers prediction
Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 30000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● testing get bathingspots › test bathingspot import helpers prediction
RepositoryNotFoundError: No repository for "BathingspotPrediction" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (src/error/RepositoryNotFoundError.ts:10:9)
at EntityManager.Object.<anonymous>.EntityManager.getRepository (src/entity-manager/EntityManager.ts:1008:19)
at Connection.Object.<anonymous>.Connection.getRepository (src/connection/Connection.ts:342:29)
at Object.getRepository (src/index.ts:282:55)
at Object.<anonymous>.exports.createPredictionWithValues (src/lib/utils/predictions-helpers.ts:190:39)
at Object.test (__tests__/entities/bathingspots.test.ts:81:31)
Test Suites: 15 failed, 6 passed, 21 total
Tests: 113 failed, 13 skipped, 4 todo, 8 passed, 138 total
Snapshots: 0 total
Time: 911.047s
Ran all test suites.
I'm sure you can fix it! If you need help, don't hesitate to ask a maintainer of the project!