@@ -98,31 +98,6 @@ describe('dynamo rx', () => {
98
98
} )
99
99
} )
100
100
101
- // TODO v3: remove when decision is made if DynamoDbWrapper.makeRequest comes back or not
102
- // describe('makeRequest', () => {
103
- // let dynamoDBWrapper: DynamoDbWrapper
104
- // let sessionValidityEnsurerMock: jest.Mock
105
- // let dynamoDBMock: jest.SpyInstance
106
- // let pseudoParams: any
107
- //
108
- // beforeEach(() => {
109
- // pseudoParams = { TableName: 'tableName', KeyConditionExpression: 'blub' }
110
- // sessionValidityEnsurerMock = jest.fn().mockReturnValueOnce(Promise.resolve(true))
111
- // updateDynamoEasyConfig({ sessionValidityEnsurer: sessionValidityEnsurerMock })
112
- // dynamoDBWrapper = new DynamoDbWrapper(new DynamoDB.DynamoDB({}))
113
- // })
114
- //
115
- // it('should call the validity ensurer before each call and call the correct dynamoDB method', async () => {
116
- // dynamoDBMock = jest
117
- // .spyOn(dynamoDBWrapper.dynamoDB, 'makeRequest')
118
- // .mockReturnValueOnce(<any>{ promise: () => Promise.resolve() })
119
- // await dynamoDBWrapper.makeRequest('pseudoOperation', pseudoParams)
120
- // expect(sessionValidityEnsurerMock).toHaveBeenCalled()
121
- // expect(dynamoDBMock).toHaveBeenCalledTimes(1)
122
- // expect(dynamoDBMock).toHaveBeenCalledWith('pseudoOperation', pseudoParams)
123
- // })
124
- // })
125
-
126
101
describe ( 'query' , ( ) => {
127
102
beforeEach ( ( ) => { } )
128
103
it ( 'should throw when no KeyConditionExpression was given' , ( ) => {
@@ -131,15 +106,4 @@ describe('dynamo rx', () => {
131
106
expect ( ( ) => dynamoDBWrapper . query ( { TableName : 'tableName' } ) ) . toThrow ( )
132
107
} )
133
108
} )
134
-
135
- // TODO v3: remove when decision is made if DynamoDbWrapper.makeRequest comes back or not
136
- // it('should call makeRequest with the given params', async () => {
137
- // const dynamoDBWrapper = new DynamoDbWrapper(new DynamoDB.DynamoDB({}))
138
- // const makeRequestMock = jest.fn().mockReturnValue({ promise: (args: any) => Promise.resolve(args) })
139
- // Object.assign(dynamoDBWrapper, { dynamoDB: { makeRequest: makeRequestMock } })
140
- //
141
- // await dynamoDBWrapper.makeRequest(<any>{ ok: true })
142
- // expect(makeRequestMock).toHaveBeenCalled()
143
- // expect(makeRequestMock.mock.calls.slice(-1)[0][0]).toEqual({ ok: true })
144
- // })
145
109
} )
0 commit comments