Skip to content

Commit 0d298ee

Browse files
correct test description. Remove unnecessary changes. Remove unused imports
1 parent 777eb40 commit 0d298ee

15 files changed

Lines changed: 29 additions & 28 deletions

.github/workflows/stage-1-commit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
needs: detect-terraform-changes
7777
if: needs.detect-terraform-changes.outputs.terraform_changed == 'true'
7878
permissions:
79-
contents: write
79+
contents: write
8080
steps:
8181
- name: "Checkout code"
8282
uses: actions/checkout@v5
@@ -317,7 +317,7 @@ jobs:
317317
uses: actions/setup-node@v4
318318
with:
319319
node-version: ${{ inputs.nodejs_version }}
320-
registry-url: "https://npm.pkg.github.com"
320+
registry-url: 'https://npm.pkg.github.com'
321321

322322
- name: check if local version differs from latest published version
323323
id: check-version

.gitleaksignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SEE: https://github.com/gitleaks/gitleaks/blob/master/README.md#gitleaksignore
1+
# SEE: <https://github.com/gitleaks/gitleaks/blob/master/README.md#gitleaksignore>
22

33
cd9c0efec38c5d63053dd865e5d4e207c0760d91:docs/guides/Perform_static_analysis.md:generic-api-key:37
44
cd9c0efec38c5d63053dd865e5d4e207c0760d91:docs/guides/Perform_static_analysis.md:sonar-api-token:37
@@ -21,3 +21,5 @@ e12407e09151898bfd8d049d57eee9db9977d56b:.github/copilot-instructions.md:generic
2121
82cf3b2e89ea24b97c4ffc09e618700fb1b0aff3:pact-contracts/pacts/letter-rendering/supplier-api-letter-request-prepared.json:generic-api-key:10
2222
82f6be3e657b46d8447e77cdc1894fba0b855c26:tests/component-tests/testCases/create-letter-request.spec.ts:generic-api-key:10
2323
debc75a97cfe551a69fd1e8694be483213322a9d:pact-contracts/pacts/letter-rendering/supplier-api-letter-request-prepared.json:generic-api-key:10
24+
793b2ab7a3e698f5848fbe24d2718f88664ec0fc:.npmrc:npm-access-token:8
25+
793b2ab7a3e698f5848fbe24d2718f88664ec0fc:.npmrc:github-pat:6

tests/component-tests/apiGateway-tests/get-letter-status.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test.describe("API Gateway Tests to Verify Get Letter Status Endpoint", () => {
3030
`${baseUrl}/${SUPPLIER_LETTERS}/${letter.id}`,
3131
{
3232
headers,
33-
},
33+
}
3434
);
3535

3636
const responseBody = await response.json();

tests/component-tests/apiGateway-tests/testCases/update-letter-status.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function patchRequestHeaders(): RequestHeaders {
4141

4242
export function patchValidRequestBody(
4343
id: string,
44-
status: string,
44+
status: string
4545
): PatchMessageRequestBody {
4646
let requestBody: PatchMessageRequestBody;
4747

@@ -59,7 +59,7 @@ export function patchValidRequestBody(
5959

6060
export function patchFailureRequestBody(
6161
id: string,
62-
status: string,
62+
status: string
6363
): PatchMessageRequestBody {
6464
let requestBody: PatchMessageRequestBody;
6565

tests/component-tests/apiGateway-tests/update-letter-status.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test.describe("API Gateway Tests to Verify Patch Status Endpoint", () => {
4545
{
4646
headers,
4747
data: body,
48-
},
48+
}
4949
);
5050

5151
expect(response.status()).toBe(202);
@@ -72,7 +72,7 @@ test.describe("API Gateway Tests to Verify Patch Status Endpoint", () => {
7272
{
7373
headers,
7474
data: body,
75-
},
75+
}
7676
);
7777

7878
expect(response.status()).toBe(202);
@@ -92,7 +92,7 @@ test.describe("API Gateway Tests to Verify Patch Status Endpoint", () => {
9292
{
9393
headers,
9494
data: body,
95-
},
95+
}
9696
);
9797

9898
const responseBody = await response.json();
@@ -113,7 +113,7 @@ test.describe("API Gateway Tests to Verify Patch Status Endpoint", () => {
113113
{
114114
headers,
115115
data: body,
116-
},
116+
}
117117
);
118118

119119
const responseBody = await response.json();
@@ -133,7 +133,7 @@ test.describe("API Gateway Tests to Verify Patch Status Endpoint", () => {
133133
{
134134
headers,
135135
data: body,
136-
},
136+
}
137137
);
138138

139139
const responseBody = await response.json();

tests/helpers/aws-sns-helper.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { SNSClient } from "@aws-sdk/client-sns";
22
import { AWS_REGION } from "tests/constants/api-constants";
3-
import { logger } from "./pino-logger";
43

54
export const snsClient = new SNSClient({ region: AWS_REGION });

tests/helpers/generate-fetch-test-data.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface SupplierApiLetters {
3333

3434
export async function createTestData(
3535
supplierId: string,
36-
count?: number,
36+
count?: number
3737
): Promise<void> {
3838
await runCreateLetter({
3939
filter: "nhs-notify-supplier-api-letter-test-data-utility",
@@ -50,7 +50,7 @@ export async function createTestData(
5050
export const getLettersBySupplier = async (
5151
supplierId: string,
5252
status: string,
53-
limit: number,
53+
limit: number
5454
) => {
5555
const supplierStatus = `${supplierId}#${status}`;
5656
const params = {
@@ -78,13 +78,13 @@ export const deleteLettersBySupplier = async (id: string) => {
7878
TableName: LETTERSTABLENAME,
7979
Key: { supplierId: SUPPLIERID, id },
8080
ReturnValues: "ALL_OLD",
81-
}),
81+
})
8282
);
8383
return resp.Attributes;
8484
};
8585

8686
export async function checkSupplierExists(
87-
supplierId: string,
87+
supplierId: string
8888
): Promise<boolean> {
8989
try {
9090
const params = {

tests/helpers/pino-logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const logger: pino.Logger = pino({
66
options: {
77
colorize: true,
88
levelFirst: true,
9-
translateTime: false, // disable time
9+
translateTime: true,
1010
ignore: "pid,hostname,time",
1111
},
1212
},

tests/helpers/pnpm-helpers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function runCreateLetter(options: {
2929

3030
const workspaceRoot = path.resolve(
3131
__dirname,
32-
"../../scripts/utilities/letter-test-data",
32+
"../../scripts/utilities/letter-test-data"
3333
);
3434
const cmd = process.platform === "win32" ? "npm.cmd" : "npm";
3535
const root = path.resolve(workspaceRoot);
@@ -73,7 +73,7 @@ export async function runCreateLetter(options: {
7373
});
7474

7575
child.on("close", (code) =>
76-
code === 0 ? resolve() : reject(new Error(`pnpm exited with ${code}`)),
76+
code === 0 ? resolve() : reject(new Error(`pnpm exited with ${code}`))
7777
);
7878
child.on("error", reject);
7979
});
@@ -91,7 +91,7 @@ export async function createSupplierData(options: {
9191

9292
const workspaceRoot = path.resolve(
9393
__dirname,
94-
"../../scripts/utilities/supplier-data",
94+
"../../scripts/utilities/supplier-data"
9595
);
9696
const cmd = process.platform === "win32" ? "npm.cmd" : "npm";
9797
const root = path.resolve(workspaceRoot);
@@ -131,7 +131,7 @@ export async function createSupplierData(options: {
131131
});
132132

133133
child.on("close", (code) =>
134-
code === 0 ? resolve() : reject(new Error(`pnpm exited with ${code}`)),
134+
code === 0 ? resolve() : reject(new Error(`pnpm exited with ${code}`))
135135
);
136136
child.on("error", reject);
137137
});

tests/helpers/validate-json-schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async function validateApiResponse(
1919
method: string,
2020
pathVar: string,
2121
status: number,
22-
body: any,
22+
body: any
2323
): Promise<ValidationResult> {
2424
const openapiDoc = await import(paths);
2525

@@ -36,7 +36,7 @@ export default async function validateApiResponse(
3636
operation.responses[status] || operation.responses.default;
3737
if (!responseSchema) {
3838
throw new Error(
39-
`No schema defined for status ${status} at ${method.toUpperCase()} ${pathVar}`,
39+
`No schema defined for status ${status} at ${method.toUpperCase()} ${pathVar}`
4040
);
4141
}
4242

0 commit comments

Comments
 (0)