Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshnuss committed May 19, 2024
1 parent 5656934 commit 05f9ff4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/sveltekit/src/lib/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ describe('SvelteKitAuth', () => {
}

test('handles /auth', async () => {
const handler = SvelteKitAuth(config)
const { handle } = SvelteKitAuth(config)

const url = new URL('http://localhost/auth/providers')
//
const response = await handler({

const response = await handle({
event: {
url,
locals: {},
Expand All @@ -48,9 +48,9 @@ describe('SvelteKitAuth', () => {
})

test('handles /billing', async () => {
const handler = SvelteKitAuth(config)
const { handle } = SvelteKitAuth(config)

const response = await handler({
const response = await handle({
event: {
url: new URL('http://localhost/billing/portal'),
locals: {
Expand All @@ -67,7 +67,7 @@ describe('SvelteKitAuth', () => {

test('ignores everything else', async () => {
const resolve = vi.fn()
const handler = SvelteKitAuth(config)
const { handle } = SvelteKitAuth(config)
const event = {
url: new URL('http://localhost/unknown'),
locals: {
Expand All @@ -78,7 +78,7 @@ describe('SvelteKitAuth', () => {
}
}

const response = await handler({ resolve, event })
const response = await handle({ resolve, event })

expect(response).toBeUndefined()
expect(resolve).toHaveBeenCalled()
Expand Down

0 comments on commit 05f9ff4

Please sign in to comment.