Skip to content

Commit 0b953bd

Browse files
authoredApr 28, 2022
test(signout): fix skipped test (#4484)
1 parent 268c063 commit 0b953bd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎packages/next-auth/src/client/__tests__/sign-out.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ test("it redirects to the URL allowed by the server", async () => {
6161
})
6262
})
6363

64-
test.skip("if url contains a hash during redirection a page reload happens", async () => {
64+
test("if url contains a hash during redirection a page reload happens", async () => {
6565
const mockUrlWithHash = "https://path/to/email/url#foo-bar-baz"
6666

6767
server.use(
68-
rest.post("http://localhost/api/auth/signout", (req, res, ctx) => {
68+
rest.post("*/api/auth/signout", (req, res, ctx) => {
6969
return res(
7070
ctx.status(200),
7171
ctx.json({

‎packages/next-auth/src/react/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ export async function signOut<R extends boolean = true>(
271271
}
272272
const res = await fetch(`${baseUrl}/signout`, fetchOptions)
273273
const data = await res.json()
274+
274275
broadcast.post({ event: "session", data: { trigger: "signout" } })
275276

276277
if (options?.redirect ?? true) {

0 commit comments

Comments
 (0)
Please sign in to comment.