Skip to content

Commit 30d297e

Browse files
committed
chore: update pricing service test
1 parent 4fe444c commit 30d297e

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/pricing-service/tests/integration/end-to-end.test.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe("integration-tests", () => {
2121
) {
2222
apiDriver = new ApiDriver(
2323
process.env.API_ENDPOINT,
24-
process.env.BEARER_TOKEN!
24+
process.env.BEARER_TOKEN!,
2525
);
2626
return;
2727
}
@@ -36,20 +36,20 @@ describe("integration-tests", () => {
3636
const apiEndpointParameter = await ssmCLient.send(
3737
new GetParameterCommand({
3838
Name: `/${env}/${serviceName}/api-endpoint`,
39-
})
39+
}),
4040
);
4141

4242
const jwtSecretParameter = await ssmCLient.send(
4343
new GetParameterCommand({
4444
Name: `/${env}/${sharedServiceName}/secret-access-key`,
45-
})
45+
}),
4646
);
4747

4848
bearerToken = generateJwt(jwtSecretParameter.Parameter!.Value!);
4949

5050
// no-dd-sa:typescript-best-practices/no-console
5151
console.log(
52-
`API endpoint under test is: ${apiEndpointParameter.Parameter!.Value!}`
52+
`API endpoint under test is: ${apiEndpointParameter.Parameter!.Value!}`,
5353
);
5454

5555
let apiEndpoint = apiEndpointParameter.Parameter!.Value!;
@@ -64,10 +64,12 @@ describe("integration-tests", () => {
6464
const testProductName = randomUUID().toString();
6565
const generatePricingResult = await apiDriver.generatePricing(
6666
testProductName,
67-
12.99
67+
12.99,
6868
);
6969

70-
expect([200]).toContain(generatePricingResult.status);
70+
// The base repo should error when calculating prices to test the
71+
// starting state of the workshop repository.
72+
expect([502]).toContain(generatePricingResult.status);
7173
});
7274

7375
function generateJwt(secretAccessKey: string): string {

0 commit comments

Comments
 (0)