Skip to content

Commit 51612b9

Browse files
committed
Fix tests
1 parent b1e0bd8 commit 51612b9

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lambdas/update-letter-queue/src/__tests__/update-letter-queue.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
} from "@internal/datastore";
66
import { mockDeep } from "jest-mock-extended";
77
import pino from "pino";
8+
import { MetricStatus } from "@internal/helpers";
89
import {
910
Context,
1011
DynamoDBRecord,
@@ -301,7 +302,7 @@ function assertSuccessMetricLogged(count: number) {
301302
expect.objectContaining({
302303
Metrics: [
303304
expect.objectContaining({
304-
Name: "letters queued successfully",
305+
Name: MetricStatus.Success,
305306
Value: count,
306307
}),
307308
],
@@ -320,7 +321,7 @@ function assertFailureMetricLogged(count: number) {
320321
expect.objectContaining({
321322
Metrics: [
322323
expect.objectContaining({
323-
Name: "letters queued failed",
324+
Name: MetricStatus.Failure,
324325
Value: count,
325326
}),
326327
],

lambdas/update-letter-queue/src/update-letter-queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from "aws-lambda";
77
import { unmarshall } from "@aws-sdk/util-dynamodb";
88
import { Unit } from "aws-embedded-metrics";
9-
import { MetricEntry, MetricStatus, buildEMFObject } from "@internal/helpers";
9+
import { MetricStatus, buildEMFObject } from "@internal/helpers";
1010
import {
1111
InsertPendingLetter,
1212
Letter,

0 commit comments

Comments
 (0)