chrisvdm / redwoodjs-stripe

A Redwood/Stripe integration made easy
MIT License
46 stars 7 forks source link

[Bug?]: stripeWebhook.test.js fails out of the box with Cannot find module '../../lib/stripe' #108

Closed jtoar closed 1 year ago

jtoar commented 1 year ago

After setting up the example store on a new JS project, via the CLI's setup command, I went to try the test and it failed with:

    Cannot find module '../../lib/stripe' from 'api/src/functions/stripeWebhook/stripeWebhook.test.js'

      1 | import { mockHttpEvent } from '@redwoodjs/testing/api'
      2 |
    > 3 | import { stripe } from 'src/lib/stripe'
        | ^
      4 |
      5 | import { handler } from './stripeWebhook'
      6 |

The api/src/lib/stripe file is indeed missing; not sure if we forgot to scaffold it out or scoped it out of the design and the test needs updating

chrisvdm commented 1 year ago

@tjoar yeah I think we scoped it out. I'll update the test Thanks for the catch