Skip to content

Commit

Permalink
fixes old frontend api url tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dopeamin committed Oct 1, 2024
1 parent 05eb177 commit 03c2b3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test:

.PHONY: unit_test
unit_test:
@npx jest --coverage "tests/unit"
@npx jest --coverage "/tests/unit"

.PHONY: cjs/build
cjs/build: $(SOURCE_FILES)
Expand Down
15 changes: 11 additions & 4 deletions tests/unit/session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ describe('Session Service Unit Tests', () => {
);
});

test('should return user using new Frontend API URL as issuer in JWT', async () => {
test('should return user using old Frontend API URL as issuer in JWT', async () => {
const jwt = await generateJWT(
'https://pro-2.frontendapi.corbado.io',
'https://pro-2.frontendapi.cloud.corbado.io',
600,
{
sub: TEST_USER_ID,
Expand All @@ -248,9 +248,16 @@ describe('Session Service Unit Tests', () => {
});
});

test('should return user using old Frontend API URL as issuer in JWT', async () => {
const jwt = await generateJWT(
test('should return user using old Frontend API URL as config issuer in JWT', async () => {
sessionService = new SessionService(
SHORT_SESSION_COOKIE_NAME,
'https://pro-2.frontendapi.cloud.corbado.io',
JWKS_URI,
10,
PROJECT_ID,
);
const jwt = await generateJWT(
'https://pro-2.frontendapi.corbado.io',
600,
{
sub: TEST_USER_ID,
Expand Down

0 comments on commit 03c2b3a

Please # to comment.