Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wensihao123 committed Aug 30, 2019
1 parent 785e415 commit 0d728ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/DynamoUtil.test.ts
Expand Up @@ -1824,14 +1824,14 @@ const boundaries2 = {
updatedAt: { S: '1500000000000' }
};

test('getInlineWarrantBoundaries', async () => {
test('getInlineWarrantBoundaryByDate', async () => {
dynamoUtil.queryData = jest.fn(() =>
Promise.resolve({
Count: 1,
Items: [boundaries as any, boundaries2 as any]
})
);
expect(await dynamoUtil.getInlineWarrantBoundaries('2019-02-02')).toMatchSnapshot();
expect(await dynamoUtil.getInlineWarrantBoundaryByDate('2019-02-02')).toMatchSnapshot();
});

test('getUTCNowTimestamp', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoUtil.ts
Expand Up @@ -801,7 +801,7 @@ export class DynamoUtil {
await this.insertData(params);
}

public async getInlineWarrantBoundaries(date: string) {
public async getInlineWarrantBoundaryByDate(date: string) {
const params = {
TableName: this.live ? CST.BOUNDARIESTABLE : CST.BOUNDARIESTABLEKOVAN,
KeyConditionExpression: `${CST.DB_TX_QTEBASE} = :${CST.DB_TX_QTEBASE} AND #${CST.DB_DATE} = :${CST.DB_DATE}`,
Expand Down
2 changes: 1 addition & 1 deletion src/__snapshots__/DynamoUtil.test.ts.snap
Expand Up @@ -667,7 +667,7 @@ Array [
]
`;

exports[`getInlineWarrantBoundaries 1`] = `
exports[`getInlineWarrantBoundaryByDate 1`] = `
Array [
0.01,
0.01,
Expand Down

0 comments on commit 0d728ef

Please sign in to comment.