code-corps / code-corps/ember-stripe-elements

Error in testing when updating arguments passed to stripe components

オープン
#48 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
64
フォーク
39
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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。