-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bump Ts.ED dependencies to v8.0.0-beta.3
- Loading branch information
Showing
38 changed files
with
107 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/cli-plugin-jest/templates/generate/generic.integration.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/cli-plugin-jest/templates/generate/server.integration.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...i-plugin-oidc-provider/templates/init/src/controllers/oidc/InteractionsController.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es/cli-plugin-oidc-provider/templates/init/src/controllers/oidc/InteractionsController.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/cli-plugin-oidc-provider/templates/init/src/interactions/AbortInteraction.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { PlatformTest } from "@tsed/common"; | ||
import { catchAsyncError } from "@tsed/core"; | ||
import { BadRequest } from "@tsed/exceptions"; | ||
import {PlatformTest} from "@tsed/platform-http"; | ||
import {catchAsyncError} from "@tsed/core"; | ||
import {BadRequest} from "@tsed/exceptions"; | ||
|
||
import { Accounts } from "../services/Accounts.js"; | ||
import { getOidcContextFixture } from "./__mock__/oidcContext.fixture.js"; | ||
import { LoginInteraction } from "./LoginInteraction.js"; | ||
import {Accounts} from "../services/Accounts.js"; | ||
import {getOidcContextFixture} from "./__mock__/oidcContext.fixture.js"; | ||
import {LoginInteraction} from "./LoginInteraction.js"; | ||
|
||
async function createInteractionFixture() { | ||
const accounts = { | ||
|
@@ -18,7 +18,7 @@ async function createInteractionFixture() { | |
} | ||
]); | ||
|
||
return { interaction, accounts }; | ||
return {interaction, accounts}; | ||
} | ||
|
||
describe("LoginInteraction", () => { | ||
|
@@ -30,7 +30,7 @@ describe("LoginInteraction", () => { | |
|
||
describe("$prompt()", () => { | ||
it("should return the prompt login context", async () => { | ||
const { interaction } = await createInteractionFixture(); | ||
const {interaction} = await createInteractionFixture(); | ||
const oidcContext = getOidcContextFixture(); | ||
|
||
const result = await interaction.$prompt(oidcContext); | ||
|
@@ -51,7 +51,7 @@ describe("LoginInteraction", () => { | |
}); | ||
}); | ||
it("should throw error when the Client is unauthorized", async () => { | ||
const { interaction } = await createInteractionFixture(); | ||
const {interaction} = await createInteractionFixture(); | ||
const oidcContext = getOidcContextFixture(); | ||
|
||
(oidcContext.checkClientId as vi.Mock).mockRejectedValue(new Error("Unknown given client_id: client_id")); | ||
|
@@ -64,10 +64,10 @@ describe("LoginInteraction", () => { | |
}); | ||
describe("submit()", () => { | ||
it("should find account", async () => { | ||
const { interaction, accounts } = await createInteractionFixture(); | ||
const {interaction, accounts} = await createInteractionFixture(); | ||
const oidcContext = getOidcContextFixture(); | ||
|
||
const payload = { email: "[email protected]", password: "pwd" }; | ||
const payload = {email: "[email protected]", password: "pwd"}; | ||
|
||
accounts.authenticate.mockResolvedValue({ | ||
accountId: "id" | ||
|
@@ -77,13 +77,13 @@ describe("LoginInteraction", () => { | |
|
||
expect(result).toEqual(undefined); | ||
expect(oidcContext.checkInteractionName).toHaveBeenCalledWith("login"); | ||
expect(oidcContext.interactionFinished).toHaveBeenCalledWith({ login: { accountId: "id" } }); | ||
expect(oidcContext.interactionFinished).toHaveBeenCalledWith({login: {accountId: "id"}}); | ||
}); | ||
it("should return to the login page and return the right context page", async () => { | ||
const { interaction, accounts } = await createInteractionFixture(); | ||
const {interaction, accounts} = await createInteractionFixture(); | ||
const oidcContext = getOidcContextFixture(); | ||
|
||
const payload = { email: "[email protected]", password: "pwd" }; | ||
const payload = {email: "[email protected]", password: "pwd"}; | ||
|
||
accounts.authenticate.mockResolvedValue(null); | ||
|
||
|
@@ -106,15 +106,15 @@ describe("LoginInteraction", () => { | |
expect(oidcContext.interactionFinished).not.toHaveBeenCalled(); | ||
}); | ||
it("should fail if the prompt name is incorrect", async () => { | ||
const { interaction } = await createInteractionFixture(); | ||
const {interaction} = await createInteractionFixture(); | ||
const oidcContext = getOidcContextFixture(); | ||
oidcContext.prompt.name = "unknown"; | ||
|
||
oidcContext.checkInteractionName.mockImplementation(() => { | ||
throw new BadRequest("Bad interaction name"); | ||
}); | ||
|
||
const payload = { email: "[email protected]", password: "pwd" }; | ||
const payload = {email: "[email protected]", password: "pwd"}; | ||
|
||
const error = await catchAsyncError<any>(() => interaction.submit(payload, oidcContext)); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/cli-plugin-passport/templates/passport-http.protocol.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.