File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,16 +92,20 @@ describe("MiRepository", () => {
9292 } ) ,
9393 ) ;
9494
95- const fetchedMi = await miRepository . getMI ( persistedMi . id , persistedMi . supplierId ) ;
95+ const fetchedMi = await miRepository . getMI (
96+ persistedMi . id ,
97+ persistedMi . supplierId ,
98+ ) ;
99+
96100 expect ( fetchedMi ) . toEqual (
97101 expect . objectContaining ( {
98102 id : expect . any ( String ) ,
99103 createdAt : "2020-02-01T00:00:00.000Z" ,
100104 updatedAt : "2020-02-01T00:00:00.000Z" ,
101105 ttl : 1_580_518_800 , // 2020-02-01T00:01:00.000Z, seconds since epoch
102106 ...mi ,
103- } )
104- )
107+ } ) ,
108+ ) ;
105109 } ) ;
106110 } ) ;
107111
Original file line number Diff line number Diff line change 1- import { DynamoDBDocumentClient , PutCommand , GetCommand } from "@aws-sdk/lib-dynamodb" ;
1+ import {
2+ DynamoDBDocumentClient ,
3+ GetCommand ,
4+ PutCommand ,
5+ } from "@aws-sdk/lib-dynamodb" ;
26import { Logger } from "pino" ;
37import { randomUUID } from "node:crypto" ;
48import { MI , MISchema } from "./types" ;
@@ -37,10 +41,7 @@ export class MIRepository {
3741 return MISchema . parse ( miDb ) ;
3842 }
3943
40- async getMI (
41- miId : string ,
42- supplierId : string ,
43- ) : Promise < MI > {
44+ async getMI ( miId : string , supplierId : string ) : Promise < MI > {
4445
4546 const result = await this . ddbClient . send (
4647 new GetCommand ( {
@@ -60,5 +61,4 @@ export class MIRepository {
6061
6162 return MISchema . parse ( result . Item ) ;
6263 }
63-
6464}
You can’t perform that action at this time.
0 commit comments