Advertisement
Guest User

error

a guest
Feb 24th, 2020
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.50 KB | None | 0 0
  1. yarn test plastic-cards.test
  2. .tsx
  3. yarn run v1.19.1
  4. $ yarn compile-messages && jest --env=jsdom plastic-car
  5. ds.test.tsx
  6. $ lingui compile
  7. Compiling message catalogs…
  8. Done!
  9. console.warn node_modules/react-dom/cjs/react-dom.dev
  10. elopment.js:12357
  11. Warning: componentWillMount has been renamed, and i
  12. s not recommended for use. See https://fb.me/react-unsa
  13. fe-component-lifecycles for details.
  14.  
  15. * Move code with side effects to componentDidMount,
  16. and set initial state in the constructor.
  17. * Rename componentWillMount to UNSAFE_componentWill
  18. Mount to suppress this warning in non-strict mode. In R
  19. eact 17.x, only the UNSAFE_ name will work. To rename a
  20. ll deprecated lifecycles to their new names, you can ru
  21. n `npx react-codemod rename-unsafe-lifecycles` in your
  22. project source folder.
  23.  
  24. Please update the following components: SideEffect(
  25. NullComponent)
  26.  
  27. console.error node_modules/jest-environment-jsdom/nod
  28. e_modules/jsdom/lib/jsdom/virtual-console.js:29
  29. Error: Error: getaddrinfo ENOTFOUND api.staging.ple
  30. o.io
  31. at Object.dispatchError (/Users/arshad_pleo/Doc
  32. uments/git_repos/pleo-projects/product-web/node_modules
  33. /jest-environment-jsdom/node_modules/jsdom/lib/jsdom/li
  34. ving/xhr-utils.js:65:19)
  35. at EventEmitter.<anonymous> (/Users/arshad_pleo
  36. /Documents/git_repos/pleo-projects/product-web/node_mod
  37. ules/jest-environment-jsdom/node_modules/jsdom/lib/jsdo
  38. m/living/xmlhttprequest.js:676:20)
  39. at EventEmitter.emit (events.js:228:7)
  40. at Request.<anonymous> (/Users/arshad_pleo/Docu
  41. ments/git_repos/pleo-projects/product-web/node_modules/
  42. jest-environment-jsdom/node_modules/jsdom/lib/jsdom/liv
  43. ing/xhr-utils.js:412:47)
  44. at Request.emit (events.js:223:5)
  45. at Request.onRequestError (/Users/arshad_pleo/D
  46. ocuments/git_repos/pleo-projects/product-web/node_modul
  47. es/request/request.js:881:8)
  48. at ClientRequest.emit (events.js:223:5)
  49. at TLSSocket.socketErrorListener (_http_client.
  50. js:406:9)
  51. at TLSSocket.emit (events.js:223:5)
  52. at emitErrorNT (internal/streams/destroy.js:92:
  53. 8) undefined
  54.  
  55. console.error node_modules/jest-environment-jsdom/nod
  56. e_modules/jsdom/lib/jsdom/virtual-console.js:29
  57. Error: Error: getaddrinfo ENOTFOUND api.staging.ple
  58. o.io
  59. at Object.dispatchError (/Users/arshad_pleo/Doc
  60. uments/git_repos/pleo-projects/product-web/node_modules
  61. /jest-environment-jsdom/node_modules/jsdom/lib/jsdom/li
  62. ving/xhr-utils.js:65:19)
  63. at EventEmitter.<anonymous> (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:676:20)
  64. at EventEmitter.emit (events.js:228:7)
  65. at Request.<anonymous> (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:412:47)
  66. at Request.emit (events.js:223:5)
  67. at Request.onRequestError (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/request/request.js:881:8)
  68. at ClientRequest.emit (events.js:223:5)
  69. at TLSSocket.socketErrorListener (_http_client.js:406:9)
  70. at TLSSocket.emit (events.js:223:5)
  71. at emitErrorNT (internal/streams/destroy.js:92:8) undefined
  72.  
  73. console.error node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/virtual-console.js:29
  74. Error: Error: getaddrinfo ENOTFOUND api.staging.pleo.io
  75. at Object.dispatchError (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:65:19)
  76. at EventEmitter.<anonymous> (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:676:20)
  77. at EventEmitter.emit (events.js:228:7)
  78. at Request.<anonymous> (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:412:47)
  79. at Request.emit (events.js:223:5)
  80. at Request.onRequestError (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/request/request.js:881:8)
  81. at ClientRequest.emit (events.js:223:5)
  82. at TLSSocket.socketErrorListener (_http_client.js:406:9)
  83. at TLSSocket.emit (events.js:223:5)
  84. at emitErrorNT (internal/streams/destroy.js:92:8) undefined
  85.  
  86. FAIL app/scripts/pages/auth/team/plastic-cards/plasti
  87. c-cards.test.tsx (5.928s)
  88. PlasticCards
  89. PlasticCards
  90. ✓ renders the disabled 'Order cards' button when
  91. there is an editable order (79ms)
  92. ✕ renders the disabled 'Order cards' button when
  93. there is a processing order (31ms)
  94. ✕ renders the disabled 'Order cards' button when
  95. there is both an editing and a processing order (24ms)
  96. ✕ renders 'plastic-card-orders' when there is an
  97. activeOrders (18ms)
  98. ✓ renders 'plastic-card-orders' when there are pr
  99. eviousOrders (21ms)
  100.  
  101. ● PlasticCards › PlasticCards › renders the disabled
  102. 'Order cards' button when there is a processing order
  103.  
  104. thrown: Object {
  105. "body": undefined,
  106. "config": Object {
  107. "adapter": [Function xhrAdapter],
  108. "data": undefined,
  109. "headers": Object {
  110. "Accept": "application/json, text/plain, */*",
  111. "Authorization": "Bearer undefined",
  112. },
  113. "maxContentLength": -1,
  114. "method": "get",
  115. "onUploadProgress": undefined,
  116. "params": Object {
  117. "status": [Array],
  118. },
  119. "timeout": 0,
  120. "transformRequest": Object {
  121. "0": [Function transformRequest],
  122. },
  123. "transformResponse": Object {
  124. "0": [Function transformResponse],
  125. },
  126. "url": "https://api.staging.pleo.io/rest/v1/companies/undefined/cardOrders",
  127. "validateStatus": [Function validateStatus],
  128. "withCredentials": undefined,
  129. "xsrfCookieName": "XSRF-TOKEN",
  130. "xsrfHeaderName": "X-XSRF-TOKEN",
  131. },
  132. "message": "",
  133. "request": XMLHttpRequest {
  134. "_eventHandlers": Object {
  135. "readystatechange": [Function handleLoad],
  136. },
  137. "_registeredHandlers": Set {
  138. "readystatechange",
  139. },
  140. "upload": XMLHttpRequestUpload {
  141. "_ownerDocument": [Document],
  142. },
  143. Symbol(flag): Object {
  144. "agentOptions": undefined,
  145. "auth": null,
  146. "body": undefined,
  147. "cookieJar": [CookieJar],
  148. "encoding": "UTF-8",
  149. "formData": false,
  150. "method": "GET",
  151. "mimeType": null,
  152. "origin": "https://app.test.pleo.io",
  153. "pool": undefined,
  154. "preflight": true,
  155. "proxy": undefined,
  156. "referrer": "https://app.test.pleo.io/",
  157. "requestHeaders": [Object],
  158. "requestManager": [RequestManager],
  159. "responseType": "",
  160. "strictSSL": undefined,
  161. "synchronous": false,
  162. "timeout": 0,
  163. "uri": "https://api.staging.pleo.io/rest/v1/companies/undefined/cardOrders?status[]=CREATED&status[]=PROCESSING&status[]=SENT",
  164. "userAgent": "Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0",
  165. "withCredentials": false,
  166. },
  167. Symbol(properties): Object {
  168. "abortError": false,
  169. "beforeSend": false,
  170. "bufferStepSize": 1048576,
  171. "client": [EventEmitter],
  172. "cookieJar": [CookieJar],
  173. "error": [Error: getaddrinfo ENOTFOUND api.staging.pleo.io],
  174. "filteredResponseHeaders": [Array],
  175. "origin": "https://app.test.pleo.io",
  176. "readyState": 4,
  177. "requestBuffer": null,
  178. "requestCache": null,
  179. "responseBuffer": null,
  180. "responseCache": null,
  181. "responseHeaders": [Object],
  182. "responseTextCache": null,
  183. "responseURL": "",
  184. "responseXMLCache": null,
  185. "send": false,
  186. "status": 0,
  187. "statusText": "",
  188. "timeoutFn": null,
  189. "timeoutId": 0,
  190. "timeoutStart": 0,
  191. "totalReceivedChunkSize": 0,
  192. "uploadComplete": true,
  193. "uploadListener": false,
  194. },
  195. },
  196. "response": undefined,
  197. "status": undefined,
  198. }
  199.  
  200. 355 | })
  201. 356 |
  202. > 357 | it("renders the disabled 'Order cards' button when there is a processing order", () => {
  203. | ^
  204. 358 | const companyId = basePlasticCardsProps.company.id
  205. 359 | nock(baseUrl)
  206. 360 | .get(`/companies/${companyId}/cardOrders`)
  207.  
  208. at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:92:20)
  209. at Suite.it (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:357:9)
  210. at Suite.describe (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:313:5)
  211. at Object.describe (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:59:1)
  212.  
  213. ● PlasticCards › PlasticCards › renders the disabled 'Order cards' button when there is both an editing and a processing order
  214.  
  215. thrown: Object {
  216. "body": undefined,
  217. "config": Object {
  218. "adapter": [Function xhrAdapter],
  219. "data": undefined,
  220. "headers": Object {
  221. "Accept": "application/json, text/plain, */*",
  222. "Authorization": "Bearer undefined",
  223. },
  224. "maxContentLength": -1,
  225. "method": "get",
  226. "onUploadProgress": undefined,
  227. "params": undefined,
  228. "timeout": 0,
  229. "transformRequest": Object {
  230. "0": [Function transformRequest],
  231. },
  232. "transformResponse": Object {
  233. "0": [Function transformResponse],
  234. },
  235. "url": "https://api.staging.pleo.io/rest/v1/recarding/companies/undefined/recarding-date",
  236. "validateStatus": [Function validateStatus],
  237. "withCredentials": undefined,
  238. "xsrfCookieName": "XSRF-TOKEN",
  239. "xsrfHeaderName": "X-XSRF-TOKEN",
  240. },
  241. "message": "",
  242. "request": XMLHttpRequest {
  243. "_eventHandlers": Object {
  244. "readystatechange": [Function handleLoad],
  245. },
  246. "_registeredHandlers": Set {
  247. "readystatechange",
  248. },
  249. "upload": XMLHttpRequestUpload {
  250. "_ownerDocument": [Document],
  251. },
  252. Symbol(flag): Object {
  253. "agentOptions": undefined,
  254. "auth": null,
  255. "body": undefined,
  256. "cookieJar": [CookieJar],
  257. "encoding": "UTF-8",
  258. "formData": false,
  259. "method": "GET",
  260. "mimeType": null,
  261. "origin": "https://app.test.pleo.io",
  262. "pool": undefined,
  263. "preflight": true,
  264. "proxy": undefined,
  265. "referrer": "https://app.test.pleo.io/",
  266. "requestHeaders": [Object],
  267. "requestManager": [RequestManager],
  268. "responseType": "",
  269. "strictSSL": undefined,
  270. "synchronous": false,
  271. "timeout": 0,
  272. "uri": "https://api.staging.pleo.io/rest/v1/recarding/companies/undefined/recarding-date",
  273. "userAgent": "Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0",
  274. "withCredentials": false,
  275. },
  276. Symbol(properties): Object {
  277. "abortError": false,
  278. "beforeSend": false,
  279. "bufferStepSize": 1048576,
  280. "client": [EventEmitter],
  281. "cookieJar": [CookieJar],
  282. "error": [Error: getaddrinfo ENOTFOUND api.staging.pleo.io],
  283. "filteredResponseHeaders": [Array],
  284. "origin": "https://app.test.pleo.io",
  285. "readyState": 4,
  286. "requestBuffer": null,
  287. "requestCache": null,
  288. "responseBuffer": null,
  289. "responseCache": null,
  290. "responseHeaders": [Object],
  291. "responseTextCache": null,
  292. "responseURL": "",
  293. "responseXMLCache": null,
  294. "send": false,
  295. "status": 0,
  296. "statusText": "",
  297. "timeoutFn": null,
  298. "timeoutId": 0,
  299. "timeoutStart": 0,
  300. "totalReceivedChunkSize": 0,
  301. "uploadComplete": true,
  302. "uploadListener": false,
  303. },
  304. },
  305. "response": undefined,
  306. "status": undefined,
  307. }
  308.  
  309. 385 | })
  310. 386 |
  311. > 387 | it("renders the disabled 'Order cards' button when there is both an editing and a processing order", () => {
  312. | ^
  313. 388 | const companyId = basePlasticCardsProps.company.id
  314. 389 | nock(baseUrl)
  315. 390 | .get(`/companies/${companyId}/cardOrders`)
  316.  
  317. at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:92:20)
  318. at Suite.it (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:387:9)
  319. at Suite.describe (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:313:5)
  320. at Object.describe (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:59:1)
  321.  
  322. ● PlasticCards › PlasticCards › renders 'plastic-card-orders' when there is an activeOrders
  323.  
  324. thrown: Object {
  325. "body": undefined,
  326. "config": Object {
  327. "adapter": [Function xhrAdapter],
  328. "data": undefined,
  329. "headers": Object {
  330. "Accept": "application/json, text/plain, */*",
  331. "Authorization": "Bearer undefined",
  332. },
  333. "maxContentLength": -1,
  334. "method": "get",
  335. "onUploadProgress": undefined,
  336. "params": undefined,
  337. "timeout": 0,
  338. "transformRequest": Object {
  339. "0": [Function transformRequest],
  340. },
  341. "transformResponse": Object {
  342. "0": [Function transformResponse],
  343. },
  344. "url": "https://api.staging.pleo.io/rest/v1/recarding/companies/undefined/gps-employees",
  345. "validateStatus": [Function validateStatus],
  346. "withCredentials": undefined,
  347. "xsrfCookieName": "XSRF-TOKEN",
  348. "xsrfHeaderName": "X-XSRF-TOKEN",
  349. },
  350. "message": "",
  351. "request": XMLHttpRequest {
  352. "_eventHandlers": Object {
  353. "readystatechange": [Function handleLoad],
  354. },
  355. "_registeredHandlers": Set {
  356. "readystatechange",
  357. },
  358. "upload": XMLHttpRequestUpload {
  359. "_ownerDocument": [Document],
  360. },
  361. Symbol(flag): Object {
  362. "agentOptions": undefined,
  363. "auth": null,
  364. "body": undefined,
  365. "cookieJar": [CookieJar],
  366. "encoding": "UTF-8",
  367. "formData": false,
  368. "method": "GET",
  369. "mimeType": null,
  370. "origin": "https://app.test.pleo.io",
  371. "pool": undefined,
  372. "preflight": true,
  373. "proxy": undefined,
  374. "referrer": "https://app.test.pleo.io/",
  375. "requestHeaders": [Object],
  376. "requestManager": [RequestManager],
  377. "responseType": "",
  378. "strictSSL": undefined,
  379. "synchronous": false,
  380. "timeout": 0,
  381. "uri": "https://api.staging.pleo.io/rest/v1/recarding/companies/undefined/gps-employees",
  382. "userAgent": "Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0",
  383. "withCredentials": false,
  384. },
  385. Symbol(properties): Object {
  386. "abortError": false,
  387. "beforeSend": false,
  388. "bufferStepSize": 1048576,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement