Skip to content

Commit

Permalink
Add failing test for js client URL with query
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Oct 11, 2023
1 parent 0dde0c0 commit 0cb0b19
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions js/packages/binderhub-client/lib/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,20 @@ test("Get full redirect URL and deal with excessive slashes (with pathType=file)
"https://hub.test-binder.org/user/something/tree/directory/index.ipynb?token=token",
);
});

test("Get full redirect URL and deal with query (with pathType=url)", () => {
const br = new BinderRepository(
"gh/test/test",
new URL("https://test-binder.org/build"),
);
expect(
br
.getFullRedirectURL(
"https://hub.test-binder.org/user/something/",
"token",
"endpoint?a=1/2&b=3",
"url",
)
.toString(),
).toBe("https://hub.test-binder.org/user/something/endpoint?a=1/2&b=3&token=token");
});

0 comments on commit 0cb0b19

Please sign in to comment.