code-corps/ember-stripe-service

Test error in new versions of Ember

Closed this issue · 1 comments

trying to run STRIPE_PUBLISHABLE_KEY="TEST_KEY" ember try:one "ember-beta" test --skip-cleanup in a fresh environment after cloning the repo in my local machine gives me an error on the following test

Acceptance | Publishable Key: it throws an error if config.stripe.publishableKey is not set
not ok 4 PhantomJS 2.1 - Acceptance | Publishable Key: it throws an error if config.stripe.publishableKey is not set
  ---
      actual: >
          false
      expected: >
          true
      stack: >
          exception@http://localhost:7357/assets/test-support.js:13640:49
          adapterDispatch@http://localhost:7357/assets/vendor.js:52173:22
          dispatchError@http://localhost:7357/assets/vendor.js:30366:23
          invokeWithOnError@http://localhost:7357/assets/vendor.js:12778:14
          flush@http://localhost:7357/assets/vendor.js:12834:15
          flush@http://localhost:7357/assets/vendor.js:12958:20
          end@http://localhost:7357/assets/vendor.js:13028:28
          run@http://localhost:7357/assets/vendor.js:13142:19
          run@http://localhost:7357/assets/vendor.js:34994:32
          startApp@http://localhost:7357/assets/tests.js:231:26
          http://localhost:7357/assets/tests.js:54:49
          throws@http://localhost:7357/assets/test-support.js:4138:17
          http://localhost:7357/assets/tests.js:53:18
          runTest@http://localhost:7357/assets/test-support.js:3292:34
          run@http://localhost:7357/assets/test-support.js:3278:13
          http://localhost:7357/assets/test-support.js:3454:15
          advance@http://localhost:7357/assets/test-support.js:2963:26
          begin@http://localhost:7357/assets/test-support.js:4613:27
          http://localhost:7357/assets/test-support.js:4573:11
      message: >
          Error: StripeService: Missing Stripe key, please set `ENV.stripe.publishableKey` in config.environment.js
      Log: |
          { type: 'info', text: '\'StripeService: initialize\'\n' }
          { type: 'error', text: 'null\n' }
          { type: 'error', text: 'null\n' }
  ...

you can see the test failing because of that in recent versions of Ember: #55
and also in this pull request also fails because of that #54

do you have any hint how to solve that?, I tried different approaches but they didn't worked, I tried to read ember's new deprecations and new release notes but they didn't say anything related to that, maybe you people know what to do

This is related to emberjs/ember-qunit#256