adopted-ember-addons / adopted-ember-addons/ember-stripe-elements

Error in testing when updating arguments passed to stripe components

未關閉
#8 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
19
分支
22
PR 合併指標
30 天內沒有已合併 PR

描述

Even though we have turned the mock config option on during testing, we still get an error about a missing method, update, when running our test suite:

Uncaught TypeError: Ember.get(...).update is not a function

It's pointing to here:

https://github.com/code-corps/ember-stripe-elements/blob/74540fc5ed106b86916eef2c29059e231095903d/addon/components/stripe-element.js#L54-L57

I'm guessing this is just because that method isn't mocked in your StripeMock class and that's merely because you don't have any tests that try to update the attributes after rendering. Replacing your mock with our own copy which also mocks the update function makes our tests pass again.

Migrated from: https://github.com/code-corps/ember-stripe-elements/issues/48

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。