@@ -6,16 +6,16 @@ import {
66 StartQueryExecutionCommand ,
77} from "@aws-sdk/client-athena" ;
88import { mockClient } from "aws-sdk-client-mock" ;
9- import AthenaExpress from ".." ;
9+ import AthenaQuery from ".." ;
1010
1111const athenaMock = mockClient ( AthenaClient ) ;
1212
1313const athena = new Athena ( { } ) ;
14- let athenaExpress : AthenaExpress ;
14+ let athenaQuery : AthenaQuery ;
1515
1616beforeEach ( ( ) => {
1717 athenaMock . reset ( ) ;
18- athenaExpress = new AthenaExpress ( athena ) ;
18+ athenaQuery = new AthenaQuery ( athena ) ;
1919} ) ;
2020
2121test ( "parse to json following ColumnInfo" , async ( ) => {
@@ -58,7 +58,7 @@ test("parse to json following ColumnInfo", async () => {
5858 } ,
5959 } ) ;
6060
61- const resultGen = athenaExpress . query ( "" ) ;
61+ const resultGen = athenaQuery . query ( "" ) ;
6262
6363 const res1 = await resultGen . next ( ) ;
6464
@@ -98,7 +98,7 @@ test("wait query completed", async () => {
9898 } ,
9999 } ) ;
100100
101- const resultGen = athenaExpress . query ( "" ) ;
101+ const resultGen = athenaQuery . query ( "" ) ;
102102
103103 const res1 = await resultGen . next ( ) ;
104104
@@ -137,7 +137,7 @@ test("get items with generator", async () => {
137137 } ,
138138 } ) ;
139139
140- const queryResultGen = athenaExpress . query ( "" ) ;
140+ const queryResultGen = athenaQuery . query ( "" ) ;
141141
142142 const res1 = await queryResultGen . next ( ) ;
143143 expect ( res1 . done ) . toBe ( false ) ;
@@ -197,7 +197,7 @@ test("get all item with generator", async () => {
197197
198198 const allItems = [ ] ;
199199
200- for await ( const items of athenaExpress . query ( "" ) ) {
200+ for await ( const items of athenaQuery . query ( "" ) ) {
201201 allItems . push ( ...items ) ;
202202 }
203203
@@ -221,7 +221,7 @@ test("throw exception when query is respond as failed", async () => {
221221 } ,
222222 } ) ;
223223
224- const resultGen = athenaExpress . query ( "" ) ;
224+ const resultGen = athenaQuery . query ( "" ) ;
225225
226226 await expect ( resultGen . next ( ) ) . rejects . toThrow ( "for-test" ) ;
227227} ) ;
@@ -231,7 +231,7 @@ test("throw exception when query is respond as failed", async () => {
231231 . on ( StartQueryExecutionCommand )
232232 . resolves ( { QueryExecutionId : undefined } ) ;
233233
234- const resultGen = athenaExpress . query ( "" ) ;
234+ const resultGen = athenaQuery . query ( "" ) ;
235235
236236 await expect ( resultGen . next ( ) ) . rejects . toThrow (
237237 "No QueryExecutionId was responded."
0 commit comments