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

Error in testing when updating arguments passed to stripe components

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
64
Forks
39
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.