SHARE
TWEET

Untitled

a guest Mar 19th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Started
  2. server is listening for requests on port 3000
  3. .....VOTE:
  4. Vote {
  5.   dataValues:
  6.    { id: 1,
  7.      value: 1,
  8.      postId: 1,
  9.      userId: 1,
  10.      createdAt: 2019-03-14T21:20:25.302Z,
  11.      updatedAt: 2019-03-14T21:20:25.302Z },
  12.   _previousDataValues:
  13.    { id: 1,
  14.      value: 1,
  15.      postId: 1,
  16.      userId: 1,
  17.      createdAt: 2019-03-14T21:20:25.302Z,
  18.      updatedAt: 2019-03-14T21:20:25.302Z },
  19.   _changed: {},
  20.   _modelOptions:
  21.    { timestamps: true,
  22.      validate: {},
  23.      freezeTableName: false,
  24.      underscored: false,
  25.      underscoredAll: false,
  26.      paranoid: false,
  27.      rejectOnEmpty: false,
  28.      whereCollection: { postId: 1, userId: 1 },
  29.      schema: null,
  30.      schemaDelimiter: '',
  31.      defaultScope: {},
  32.      scopes: [],
  33.      indexes: [],
  34.      name: { plural: 'Votes', singular: 'Vote' },
  35.      omitNull: false,
  36.      sequelize:
  37.       Sequelize {
  38.         options: [Object],
  39.         config: [Object],
  40.         dialect: [PostgresDialect],
  41.         queryInterface: [QueryInterface],
  42.         models: [Object],
  43.         modelManager: [ModelManager],
  44.         connectionManager: [ConnectionManager],
  45.         importCache: [Object],
  46.         test: [Object] },
  47.      hooks: {},
  48.      uniqueKeys: {} },
  49.   _options:
  50.    { isNewRecord: false,
  51.      _schema: null,
  52.      _schemaDelimiter: '',
  53.      raw: true,
  54.      attributes:
  55.       [ 'id', 'value', 'postId', 'userId', 'createdAt', 'updatedAt' ] },
  56.   __eagerlyLoadedAssociations: [],
  57.   isNewRecord: false }
  58. ------------
  59. FOUND POST:
  60. Post {
  61.   dataValues:
  62.    { id: 1,
  63.      title: 'My first visit to Proxima Centauri b',
  64.      body: 'I saw some rocks.',
  65.      topicId: 1,
  66.      userId: 1,
  67.      createdAt: 2019-03-14T21:20:25.287Z,
  68.      updatedAt: 2019-03-14T21:20:25.287Z },
  69.   _previousDataValues:
  70.    { id: 1,
  71.      title: 'My first visit to Proxima Centauri b',
  72.      body: 'I saw some rocks.',
  73.      topicId: 1,
  74.      userId: 1,
  75.      createdAt: 2019-03-14T21:20:25.287Z,
  76.      updatedAt: 2019-03-14T21:20:25.287Z },
  77.   _changed: {},
  78.   _modelOptions:
  79.    { timestamps: true,
  80.      validate: {},
  81.      freezeTableName: false,
  82.      underscored: false,
  83.      underscoredAll: false,
  84.      paranoid: false,
  85.      rejectOnEmpty: false,
  86.      whereCollection: { id: 1 },
  87.      schema: null,
  88.      schemaDelimiter: '',
  89.      defaultScope: {},
  90.      scopes: [],
  91.      indexes: [],
  92.      name: { plural: 'Posts', singular: 'Post' },
  93.      omitNull: false,
  94.      sequelize:
  95.       Sequelize {
  96.         options: [Object],
  97.         config: [Object],
  98.         dialect: [PostgresDialect],
  99.         queryInterface: [QueryInterface],
  100.         models: [Object],
  101.         modelManager: [ModelManager],
  102.         connectionManager: [ConnectionManager],
  103.         importCache: [Object],
  104.         test: [Object] },
  105.      hooks: {},
  106.      uniqueKeys: {} },
  107.   _options:
  108.    { isNewRecord: false,
  109.      _schema: null,
  110.      _schemaDelimiter: '',
  111.      raw: true,
  112.      attributes:
  113.       [ 'id',
  114.         'title',
  115.         'body',
  116.         'topicId',
  117.         'userId',
  118.         'createdAt',
  119.         'updatedAt' ] },
  120.   __eagerlyLoadedAssociations: [],
  121.   isNewRecord: false }
  122. F
  123.  
  124. Failures:
  125. 1) routes : votes signed in user voting on a post #post.getPoints() should return the number of votes
  126.   Message:
  127.     TypeError: Cannot read property 'length' of undefined
  128.   Stack:
  129.         at <Jasmine>
  130.         at model.Post.getPoints (/Users/piontekle/bloc/bloccit/src/db/models/post.js:46:19)
  131.         at Post.findOne.then (/Users/piontekle/bloc/bloccit/spec/integration/votes_spec.js:242:29)
  132.         at tryCatcher (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/util.js:16:23)
  133.         at Promise._settlePromiseFromHandler (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:512:31)
  134.         at Promise._settlePromise (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:569:18)
  135.         at Promise._settlePromise0 (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:614:10)
  136.         at Promise._settlePromises (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:694:18)
  137.         at _drainQueueStep (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:138:12)
  138.         at _drainQueue (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:131:9)
  139.         at Async._drainQueues (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:147:5)
  140.         at Immediate.Async.drainQueues [as _onImmediate] (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:17:14)
  141.         at runCallback (timers.js:705:18)
  142.         at tryOnImmediate (timers.js:676:5)
  143.         at processImmediate (timers.js:658:5)
  144.   Message:
  145.     Failed: Cannot read property 'length' of undefined
  146.   Stack:
  147.         at <Jasmine>
  148.         at model.Post.getPoints (/Users/piontekle/bloc/bloccit/src/db/models/post.js:46:19)
  149.         at Post.findOne.then (/Users/piontekle/bloc/bloccit/spec/integration/votes_spec.js:242:29)
  150.         at tryCatcher (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/util.js:16:23)
  151.         at Promise._settlePromiseFromHandler (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:512:31)
  152.         at Promise._settlePromise (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:569:18)
  153.         at Promise._settlePromise0 (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:614:10)
  154.         at Promise._settlePromises (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/promise.js:694:18)
  155.         at _drainQueueStep (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:138:12)
  156.         at _drainQueue (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:131:9)
  157.         at Async._drainQueues (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:147:5)
  158.         at Immediate.Async.drainQueues [as _onImmediate] (/Users/piontekle/bloc/bloccit/node_modules/bluebird/js/release/async.js:17:14)
  159.         at runCallback (timers.js:705:18)
  160.         at tryOnImmediate (timers.js:676:5)
  161.         at processImmediate (timers.js:658:5)
  162.  
  163. 6 specs, 1 failure
  164. Finished in 0.951 seconds
  165. npm ERR! Test failed.  See above for more details.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top