Skip to content

Commit

Permalink
feat: export api constructor too
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Oct 12, 2022
1 parent d5d9c9e commit 96f6011
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

module.exports.Api = require('./paddle/api')
module.exports.SubscriptionsHooks = require('./subscription-hook-storage')
module.exports.SubscriptionInfo = require('./subscription-info')
module.exports.middleware = require('./middleware')
Expand Down
2 changes: 1 addition & 1 deletion test-e2e/spec/subscription.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.beforeAll(testPageRunner.start)
test.afterAll(testPageRunner.stop)

test.beforeAll(async () => {
const API = await (await import('../../lib/paddle/api.js')).default
const API = await (await import('../../lib/index')).Api
api = new API({ useSandbox: true, authCode: process.env.AUTH_CODE, vendorId: process.env.VENDOR_ID })
await api.init()

Expand Down

0 comments on commit 96f6011

Please sign in to comment.