Skip to content

Commit

Permalink
fix(testing): add support for sdk v3 types
Browse files Browse the repository at this point in the history
  • Loading branch information
whimzyLive committed Aug 21, 2022
1 parent 706414b commit 6027aaa
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/testing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ import {
Container,
ConnectionManager,
} from '@typedorm/core';
import {DocumentClient} from '@typedorm/document-client';

import {DynamoDB} from 'aws-sdk';

export function createTestConnection(
export function createTestConnection<T = any>(
connectionOptions: Replace<
ConnectionOptions,
'documentClient',
{
documentClient?: {
[key in keyof DynamoDB.DocumentClient]?: jest.SpyInstance;
};
documentClient?:
| {
[key in keyof DocumentClient]?: jest.SpyInstance;
}
| T;
}
>
) {
Expand Down

0 comments on commit 6027aaa

Please sign in to comment.