Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in testing when updating arguments passed to stripe components #48

Open
kimroen opened this issue Jun 28, 2019 · 0 comments
Open

Comments

@kimroen
Copy link

kimroen commented Jun 28, 2019

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:

didUpdateAttrs() {
this._super(...arguments);
get(this, 'stripeElement').update(get(this, 'options'));
},

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant