· 7 years ago · Feb 23, 2019, 08:36 AM
1tanya@DESKTOP-4Q72IVM MINGW64 ~/bloc/bloccit (checkpoint-post-resource-part-2)
2$ npm test
3
4> bloccit@1.0.0 test C:\Users\tanya\bloc\bloccit
5> set NODE_ENV=test&& jasmine
6
7Started
8server is listening for requests on port 3000
9Welcome to Bloccit
10About Us
11.............FFFFFF
12
13Failures:
141) routes : topics POST /topics/:id/destroy should delete the topic with the associated ID
15 Message:
16 Expected 'Not Found. Redirecting to /' to contain 'JS Frameworks'.
17 Stack:
18 Error: Expected 'Not Found. Redirecting to /' to contain 'JS Frameworks'.
19 at <Jasmine>
20 at Request.request.get [as _callback] (C:\Users\tanya\bloc\bloccit\spec\integration\topics_spec.js:91:22)
21 at Request.self.callback (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:186:22)
22 at Request.emit (events.js:182:13)
23 at Request.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1163:10)
24 at Request.emit (events.js:182:13)
25 at IncomingMessage.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1085:12)
26 at Object.onceWrapper (events.js:273:13)
27 at IncomingMessage.emit (events.js:187:15)
28 at endReadableNT (_stream_readable.js:1094:12)
29 at process._tickCallback (internal/process/next_tick.js:63:19)
30 Message:
31 ReferenceError: done is not defined
32 Stack:
33 at <Jasmine>
34 at Request.request.get [as _callback] (C:\Users\tanya\bloc\bloccit\spec\integration\topics_spec.js:92:9)
35 at Request.self.callback (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:186:22)
36 at Request.emit (events.js:182:13)
37 at Request.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1163:10)
38 at Request.emit (events.js:182:13)
39 at IncomingMessage.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1085:12)
40 at Object.onceWrapper (events.js:273:13)
41 at IncomingMessage.emit (events.js:187:15)
42 at endReadableNT (_stream_readable.js:1094:12)
43 at process._tickCallback (internal/process/next_tick.js:63:19)
44 Message:
45 Failed: done is not defined
46 Stack:
47 at <Jasmine>
48 at Request.request.get [as _callback] (C:\Users\tanya\bloc\bloccit\spec\integration\topics_spec.js:92:9)
49 at Request.self.callback (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:186:22)
50 at Request.emit (events.js:182:13)
51 at Request.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1163:10)
52 at Request.emit (events.js:182:13)
53 at IncomingMessage.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1085:12)
54 at Object.onceWrapper (events.js:273:13)
55 at IncomingMessage.emit (events.js:187:15)
56 at endReadableNT (_stream_readable.js:1094:12)
57 at process._tickCallback (internal/process/next_tick.js:63:19)
58 Message:
59 TypeError: Cannot read property 'id' of undefined
60 Stack:
61 at <Jasmine>
62 at topicQueries.deleteTopic (C:\Users\tanya\bloc\bloccit\src\controllers\topicController.js:44:44)
63 at Topic.destroy.then.catch (C:\Users\tanya\bloc\bloccit\src\db\queries.topics.js:51:7)
64 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
65 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
66 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
67 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
68 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
69 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
70 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
71 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
72 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
73 at runCallback (timers.js:705:18)
74 at tryOnImmediate (timers.js:676:5)
75 at processImmediate (timers.js:658:5)
76 Message:
77 Failed: Cannot read property 'id' of undefined
78 Stack:
79 at <Jasmine>
80 at topicQueries.deleteTopic (C:\Users\tanya\bloc\bloccit\src\controllers\topicController.js:44:44)
81 at Topic.destroy.then.catch (C:\Users\tanya\bloc\bloccit\src\db\queries.topics.js:51:7)
82 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
83 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
84 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
85 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
86 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
87 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
88 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
89 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
90 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
91 at runCallback (timers.js:705:18)
92 at tryOnImmediate (timers.js:676:5)
93 at processImmediate (timers.js:658:5)
94
952) routes : topics GET /topics/:id/edit should render a view with an edit topic form
96 Message:
97 TypeError: Cannot read property '1' of null
98 Stack:
99 at <Jasmine>
100 at query.catch.then.then.queryResult (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:135:90)
101 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
102 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
103 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
104 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
105 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:694:18)
106 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
107 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
108 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
109 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
110 at runCallback (timers.js:705:18)
111 at tryOnImmediate (timers.js:676:5)
112 at processImmediate (timers.js:658:5)
113 Message:
114 Failed: Cannot read property '1' of null
115 Stack:
116 at <Jasmine>
117 at query.catch.then.then.queryResult (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:135:90)
118 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
119 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
120 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
121 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
122 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:694:18)
123 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
124 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
125 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
126 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
127 at runCallback (timers.js:705:18)
128 at tryOnImmediate (timers.js:676:5)
129 at processImmediate (timers.js:658:5)
130
1313) routes : topics POST /topics/:id/update should update the topic with the given values
132 Message:
133 Expected 'Not Found. Redirecting to /' to contain 'Edit Topic'.
134 Stack:
135 Error: Expected 'Not Found. Redirecting to /' to contain 'Edit Topic'.
136 at <Jasmine>
137 at Request.request.get [as _callback] (C:\Users\tanya\bloc\bloccit\spec\integration\topics_spec.js:129:22)
138 at Request.self.callback (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:186:22)
139 at Request.emit (events.js:182:13)
140 at Request.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1163:10)
141 at Request.emit (events.js:182:13)
142 at IncomingMessage.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1085:12)
143 at Object.onceWrapper (events.js:273:13)
144 at IncomingMessage.emit (events.js:187:15)
145 at endReadableNT (_stream_readable.js:1094:12)
146 at process._tickCallback (internal/process/next_tick.js:63:19)
147 Message:
148 Expected 'Not Found. Redirecting to /' to contain 'JS Frameworks'.
149 Stack:
150 Error: Expected 'Not Found. Redirecting to /' to contain 'JS Frameworks'.
151 at <Jasmine>
152 at Request.request.get [as _callback] (C:\Users\tanya\bloc\bloccit\spec\integration\topics_spec.js:130:22)
153 at Request.self.callback (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:186:22)
154 at Request.emit (events.js:182:13)
155 at Request.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1163:10)
156 at Request.emit (events.js:182:13)
157 at IncomingMessage.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1085:12)
158 at Object.onceWrapper (events.js:273:13)
159 at IncomingMessage.emit (events.js:187:15)
160 at endReadableNT (_stream_readable.js:1094:12)
161 at process._tickCallback (internal/process/next_tick.js:63:19)
162 Message:
163 ReferenceError: done is not defined
164 Stack:
165 at <Jasmine>
166 at Request.request.get [as _callback] (C:\Users\tanya\bloc\bloccit\spec\integration\topics_spec.js:131:9)
167 at Request.self.callback (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:186:22)
168 at Request.emit (events.js:182:13)
169 at Request.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1163:10)
170 at Request.emit (events.js:182:13)
171 at IncomingMessage.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1085:12)
172 at Object.onceWrapper (events.js:273:13)
173 at IncomingMessage.emit (events.js:187:15)
174 at endReadableNT (_stream_readable.js:1094:12)
175 at process._tickCallback (internal/process/next_tick.js:63:19)
176 Message:
177 Failed: done is not defined
178 Stack:
179 at <Jasmine>
180 at Request.request.get [as _callback] (C:\Users\tanya\bloc\bloccit\spec\integration\topics_spec.js:131:9)
181 at Request.self.callback (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:186:22)
182 at Request.emit (events.js:182:13)
183 at Request.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1163:10)
184 at Request.emit (events.js:182:13)
185 at IncomingMessage.<anonymous> (C:\Users\tanya\bloc\bloccit\node_modules\request\request.js:1085:12)
186 at Object.onceWrapper (events.js:273:13)
187 at IncomingMessage.emit (events.js:187:15)
188 at endReadableNT (_stream_readable.js:1094:12)
189 at process._tickCallback (internal/process/next_tick.js:63:19)
190 Message:
191 SequelizeDatabaseError: relation "Topics" does not exist
192 Stack:
193 error properties: Object({ parent: error: relation "Topics" does not exist, original: error: relation "Topics" does not exist, sql: 'SELECT "id", "title", "description", "createdAt", "updatedAt" FROM "Topics" AS "Topic" WHERE "Topic"."id" = '1';' })
194 at <Jasmine>
195 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:363:16)
196 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
197 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
198 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
199 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
200 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
201 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
202 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
203 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
204 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
205 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
206 at runCallback (timers.js:705:18)
207 at tryOnImmediate (timers.js:676:5)
208 at processImmediate (timers.js:658:5)
209 Message:
210 Failed: relation "Topics" does not exist
211 Stack:
212 error properties: Object({ parent: error: relation "Topics" does not exist, original: error: relation "Topics" does not exist, sql: 'SELECT "id", "title", "description", "createdAt", "updatedAt" FROM "Topics" AS "Topic" WHERE "Topic"."id" = '1';' })
213 at <Jasmine>
214 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:363:16)
215 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
216 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
217 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
218 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
219 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
220 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
221 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
222 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
223 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
224 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
225 at runCallback (timers.js:705:18)
226 at tryOnImmediate (timers.js:676:5)
227 at processImmediate (timers.js:658:5)
228
2294) Post #create() should create a post object with a title, body, and assigned topic
230 Message:
231 SequelizeUniqueConstraintError: Validation error
232 Stack:
233 error properties: Object({ errors: [ ValidationErrorItem({ message: 'typname must be unique', type: 'unique violation', path: 'typname', value: 'Topics_id_seq', origin: 'DB', instance: null, validatorKey: 'not_unique', validatorName: null, validatorArgs: [ ] }), ValidationErrorItem({ message: 'typnamespace must be unique', type: 'unique violation', path: 'typnamespace', value: '2200', origin: 'DB', instance: null, validatorKey: 'not_unique', validatorName: null, validatorArgs: [ ] }) ], fields: Object({ typname: 'Topics_id_seq', typnamespace: '2200' }), parent: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index", original: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index", sql: 'CREATE TABLE IF NOT EXISTS "Topics" ("id" SERIAL , "title" VARCHAR(255) NOT NULL, "description" VARCHAR(255) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, PRIMARY KEY ("id"));' })
234 at <Jasmine>
235 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:325:18)
236 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
237 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
238 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
239 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
240 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
241 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
242 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
243 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
244 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
245 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
246 at runCallback (timers.js:705:18)
247 at tryOnImmediate (timers.js:676:5)
248 at processImmediate (timers.js:658:5)
249 Message:
250 Failed: Validation error
251 Stack:
252 error properties: Object({ errors: [ ValidationErrorItem({ message: 'typname must be unique', type: 'unique violation', path: 'typname', value: 'Topics_id_seq', origin: 'DB', instance: null, validatorKey: 'not_unique', validatorName: null, validatorArgs: [ ] }), ValidationErrorItem({ message: 'typnamespace must be unique', type: 'unique violation', path: 'typnamespace', value: '2200', origin: 'DB', instance: null, validatorKey: 'not_unique', validatorName: null, validatorArgs: [ ] }) ], fields: Object({ typname: 'Topics_id_seq', typnamespace: '2200' }), parent: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index", original: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index", sql: 'CREATE TABLE IF NOT EXISTS "Topics" ("id" SERIAL , "title" VARCHAR(255) NOT NULL, "description" VARCHAR(255) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, PRIMARY KEY ("id"));' })
253 at <Jasmine>
254 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:325:18)
255 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
256 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
257 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
258 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
259 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
260 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
261 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
262 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
263 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
264 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
265 at runCallback (timers.js:705:18)
266 at tryOnImmediate (timers.js:676:5)
267 at processImmediate (timers.js:658:5)
268 Message:
269 TypeError: Cannot read property 'id' of undefined
270 Stack:
271 at <Jasmine>
272 at UserContext.it (C:\Users\tanya\bloc\bloccit\spec\unit\post_spec.js:44:29)
273 at <Jasmine>
274 at process.emit (events.js:182:13)
275 at C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\debuggability.js:199:33
276 at activeFireEvent (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\debuggability.js:242:44)
277 at fireRejectionEvent (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\debuggability.js:632:14)
278 at Promise._notifyUnhandledRejection (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\debuggability.js:65:9)
279 at Timeout._onTimeout (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\debuggability.js:44:14)
280 at ontimeout (timers.js:436:11)
281 at tryOnTimeout (timers.js:300:5)
282 at listOnTimeout (timers.js:263:5)
283 at Timer.processTimers (timers.js:223:10)
284
2855) Post #create() should not create a post with missing title, body, or assigned topic
286 Message:
287 SequelizeDatabaseError: relation "Topics" does not exist
288 Stack:
289 error properties: Object({ parent: error: relation "Topics" does not exist, original: error: relation "Topics" does not exist, sql: 'CREATE TABLE IF NOT EXISTS "Banners" ("id" SERIAL , "source" VARCHAR(255), "description" VARCHAR(255), "createdAt" TIMESTAMP WITH TIME ZONENOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "topicId" INTEGER REFERENCES "Topics" ("id") ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY ("id"));' })
290 at <Jasmine>
291 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:363:16)
292 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
293 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
294 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
295 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
296 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
297 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
298 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
299 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
300 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
301 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
302 at runCallback (timers.js:705:18)
303 at tryOnImmediate (timers.js:676:5)
304 at processImmediate (timers.js:658:5)
305 Message:
306 Failed: relation "Topics" does not exist
307 Stack:
308 error properties: Object({ parent: error: relation "Topics" does not exist, original: error: relation "Topics" does not exist, sql: 'CREATE TABLE IF NOT EXISTS "Banners" ("id" SERIAL , "source" VARCHAR(255), "description" VARCHAR(255), "createdAt" TIMESTAMP WITH TIME ZONENOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "topicId" INTEGER REFERENCES "Topics" ("id") ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY ("id"));' })
309 at <Jasmine>
310 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:363:16)
311 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
312 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
313 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
314 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
315 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
316 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
317 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
318 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
319 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
320 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
321 at runCallback (timers.js:705:18)
322 at tryOnImmediate (timers.js:676:5)
323 at processImmediate (timers.js:658:5)
324 Message:
325 SequelizeUniqueConstraintError: Validation error
326 Stack:
327 error properties: Object({ errors: [ ValidationErrorItem({ message: 'typname must be unique', type: 'unique violation', path: 'typname', value: 'Topics_id_seq', origin: 'DB', instance: null, validatorKey: 'not_unique', validatorName: null, validatorArgs: [ ] }), ValidationErrorItem({ message: 'typnamespace must be unique', type: 'unique violation', path: 'typnamespace', value: '2200', origin: 'DB', instance: null, validatorKey: 'not_unique', validatorName: null, validatorArgs: [ ] }) ], fields: Object({ typname: 'Topics_id_seq', typnamespace: '2200' }), parent: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index", original: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index", sql: 'CREATE TABLE IF NOT EXISTS "Topics" ("id" SERIAL , "title" VARCHAR(255) NOT NULL, "description" VARCHAR(255) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, PRIMARY KEY ("id"));' })
328 at <Jasmine>
329 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:325:18)
330 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
331 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
332 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
333 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
334 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
335 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
336 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
337 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
338 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
339 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
340 at runCallback (timers.js:705:18)
341 at tryOnImmediate (timers.js:676:5)
342 at processImmediate (timers.js:658:5)
343 Message:
344 Failed: Validation error
345 Stack:
346 error properties: Object({ errors: [ ValidationErrorItem({ message: 'typname must be unique', type: 'unique violation', path: 'typname', value: 'Topics_id_seq', origin: 'DB', instance: null, validatorKey: 'not_unique', validatorName: null, validatorArgs: [ ] }), ValidationErrorItem({ message: 'typnamespace must be unique', type: 'unique violation', path: 'typnamespace', value: '2200', origin: 'DB', instance: null, validatorKey: 'not_unique', validatorName: null, validatorArgs: [ ] }) ], fields: Object({ typname: 'Topics_id_seq', typnamespace: '2200' }), parent: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index", original: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index", sql: 'CREATE TABLE IF NOT EXISTS "Topics" ("id" SERIAL , "title" VARCHAR(255) NOT NULL, "description" VARCHAR(255) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, PRIMARY KEY ("id"));' })
347 at <Jasmine>
348 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:325:18)
349 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
350 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
351 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
352 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
353 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
354 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
355 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
356 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
357 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
358 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
359 at runCallback (timers.js:705:18)
360 at tryOnImmediate (timers.js:676:5)
361 at processImmediate (timers.js:658:5)
362
3636) Post #setTopic() should associate a topic and a post together
364 Message:
365 SequelizeDatabaseError: relation "Topics" does not exist
366 Stack:
367 error properties: Object({ parent: error: relation "Topics" does not exist, original: error: relation "Topics" does not exist, sql: 'CREATE TABLE IF NOT EXISTS "Banners" ("id" SERIAL , "source" VARCHAR(255), "description" VARCHAR(255), "createdAt" TIMESTAMP WITH TIME ZONENOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "topicId" INTEGER REFERENCES "Topics" ("id") ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY ("id"));' })
368 at <Jasmine>
369 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:363:16)
370 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
371 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
372 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
373 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
374 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
375 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
376 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
377 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
378 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
379 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
380 at runCallback (timers.js:705:18)
381 at tryOnImmediate (timers.js:676:5)
382 at processImmediate (timers.js:658:5)
383 Message:
384 Failed: relation "Topics" does not exist
385 Stack:
386 error properties: Object({ parent: error: relation "Topics" does not exist, original: error: relation "Topics" does not exist, sql: 'CREATE TABLE IF NOT EXISTS "Banners" ("id" SERIAL , "source" VARCHAR(255), "description" VARCHAR(255), "createdAt" TIMESTAMP WITH TIME ZONENOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "topicId" INTEGER REFERENCES "Topics" ("id") ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY ("id"));' })
387 at <Jasmine>
388 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:363:16)
389 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
390 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
391 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
392 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
393 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
394 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
395 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
396 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
397 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
398 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
399 at runCallback (timers.js:705:18)
400 at tryOnImmediate (timers.js:676:5)
401 at processImmediate (timers.js:658:5)
402 Message:
403 SequelizeDatabaseError: relation "Topics" does not exist
404 Stack:
405 error properties: Object({ parent: error: relation "Topics" does not exist, original: error: relation "Topics" does not exist, sql: 'INSERT INTO "Topics" ("id","title","description","createdAt","updatedAt") VALUES (DEFAULT,'Challenges of interstellar travel','1. The Wi-Fi is terrible','2019-02-20 15:36:19.737 +00:00','2019-02-20 15:36:19.737 +00:00') RETURNING *;' })
406 at <Jasmine>
407 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:363:16)
408 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
409 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
410 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
411 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
412 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
413 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
414 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
415 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
416 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
417 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
418 at runCallback (timers.js:705:18)
419 at tryOnImmediate (timers.js:676:5)
420 at processImmediate (timers.js:658:5)
421 Message:
422 Failed: relation "Topics" does not exist
423 Stack:
424 error properties: Object({ parent: error: relation "Topics" does not exist, original: error: relation "Topics" does not exist, sql: 'INSERT INTO "Topics" ("id","title","description","createdAt","updatedAt") VALUES (DEFAULT,'Challenges of interstellar travel','1. The Wi-Fi is terrible','2019-02-20 15:36:19.737 +00:00','2019-02-20 15:36:19.737 +00:00') RETURNING *;' })
425 at <Jasmine>
426 at Query.formatError (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:363:16)
427 at query.catch.err (C:\Users\tanya\bloc\bloccit\node_modules\sequelize\lib\dialects\postgres\query.js:86:18)
428 at tryCatcher (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\util.js:16:23)
429 at Promise._settlePromiseFromHandler (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:512:31)
430 at Promise._settlePromise (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:569:18)
431 at Promise._settlePromise0 (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:614:10)
432 at Promise._settlePromises (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\promise.js:690:18)
433 at _drainQueueStep (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:138:12)
434 at _drainQueue (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:131:9)
435 at Async._drainQueues (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:147:5)
436 at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\tanya\bloc\bloccit\node_modules\bluebird\js\release\async.js:17:14)
437 at runCallback (timers.js:705:18)
438 at tryOnImmediate (timers.js:676:5)
439 at processImmediate (timers.js:658:5)
440
44119 specs, 6 failures
442Finished in 1.975 seconds
443npm ERR! Test failed. See above for more details.