omise / omise-node

Omise Node.js Library
https://docs.opn.ooo
102 stars 53 forks source link

Test fails in actual API server #51

Closed PanJ closed 8 years ago

PanJ commented 8 years ago

While I am trying to create test to cover https://github.com/omise/omise-node/issues/50, I found that the current test is failing on 2 cases. Here is the information:

  35 passing (12s)
  2 failing

  1) Omise #Charges should be able to reverse a charge:
     Uncaught TypeError: Cannot read property 'object' of undefined
      at test/test_omise_charges.js:111:20
      at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
      at Promise.errorAdapter (node_modules/bluebird/js/main/nodeify.js:36:34)
      at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:582:21)
      at Promise._settlePromises (node_modules/bluebird/js/main/promise.js:700:14)
      at Async._drainQueue (node_modules/bluebird/js/main/async.js:123:16)
      at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
      at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)

  2) Omise #Events should be able to retrieve an event:
     Uncaught TypeError: Cannot read property 'object' of undefined
      at test/test_omise_events.js:25:20
      at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
      at Promise.errorAdapter (node_modules/bluebird/js/main/nodeify.js:36:34)
      at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:582:21)
      at Promise._settlePromises (node_modules/bluebird/js/main/promise.js:700:14)
      at Async._drainQueue (node_modules/bluebird/js/main/async.js:123:16)
      at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
      at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)

Maybe there's something about API versioning.

zdk commented 8 years ago

Please check out https://github.com/omise/omise-node/pull/55 The fix includes in version 0.5.3