Skip to content

Commit 08c4864

Browse files
committed
refactor: fix formatting in oidc.spec.ts and oidc.ts for improved readability
1 parent abe667e commit 08c4864

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/oidc.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ describe("authenticateOidc", () => {
5858
// Mock getIDToken
5959
(core.getIDToken as jest.Mock).mockResolvedValue(
6060
"h." +
61-
Buffer.from(JSON.stringify({ sub: "owner/name" })).toString("base64") +
62-
".sig",
61+
Buffer.from(JSON.stringify({ sub: "owner/name" })).toString("base64") +
62+
".sig",
6363
);
6464
// Mock HttpClient.post
6565
const fakeResponse: HttpClientResponse = {
@@ -75,8 +75,8 @@ describe("authenticateOidc", () => {
7575
it("should succeed with 201 Created status", async () => {
7676
(core.getIDToken as jest.Mock).mockResolvedValue(
7777
"h." +
78-
Buffer.from(JSON.stringify({ sub: "owner/name" })).toString("base64") +
79-
".sig",
78+
Buffer.from(JSON.stringify({ sub: "owner/name" })).toString("base64") +
79+
".sig",
8080
);
8181
const fakeResponse: HttpClientResponse = {
8282
message: { statusCode: 201, headers: {} as IncomingHttpHeaders },
@@ -100,8 +100,8 @@ describe("authenticateOidc", () => {
100100
it("should throw if FlyFrog OIDC returns non-200 status", async () => {
101101
(core.getIDToken as jest.Mock).mockResolvedValue(
102102
"h." +
103-
Buffer.from(JSON.stringify({ sub: "owner/name" })).toString("base64") +
104-
".sig",
103+
Buffer.from(JSON.stringify({ sub: "owner/name" })).toString("base64") +
104+
".sig",
105105
);
106106
const fakeResponse: HttpClientResponse = {
107107
message: { statusCode: 500, headers: {} as IncomingHttpHeaders },
@@ -117,8 +117,8 @@ describe("authenticateOidc", () => {
117117
it("should throw if access_token is missing in response", async () => {
118118
(core.getIDToken as jest.Mock).mockResolvedValue(
119119
"h." +
120-
Buffer.from(JSON.stringify({ sub: "owner/name" })).toString("base64") +
121-
".sig",
120+
Buffer.from(JSON.stringify({ sub: "owner/name" })).toString("base64") +
121+
".sig",
122122
);
123123
const fakeResponse: HttpClientResponse = {
124124
message: { statusCode: 200, headers: {} as IncomingHttpHeaders },

src/oidc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { OutgoingHttpHeaders } from "http";
99

1010
// Represents the JSON body of the token exchange response
11-
type TokenJson = { access_token?: string;[key: string]: unknown };
11+
type TokenJson = { access_token?: string; [key: string]: unknown };
1212

1313
/**
1414
* Gets an OIDC token from the GitHub Actions runtime

0 commit comments

Comments
 (0)