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