@@ -15,9 +15,9 @@ need to be removed first.
15
15
16
16
describe ( '--Integration Tests--' , ( ) => {
17
17
describe ( '--Method Tests--' , ( ) => {
18
- beforeAll ( async ( ) => {
18
+ beforeAll ( ( done ) => {
19
19
client = new ksqljs ( { ksqldbURL : 'http://localhost:8088' } ) ;
20
- await client . ksql ( 'DROP STREAM IF EXISTS TESTJESTSTREAM DELETE TOPIC;' ) ;
20
+ done ( ) ;
21
21
} ) ;
22
22
23
23
afterAll ( async ( ) => {
@@ -38,9 +38,9 @@ describe('--Integration Tests--', () => {
38
38
expect ( streamExists ) . toEqual ( true ) ;
39
39
} )
40
40
41
- it ( '.push properly creates a push query' , ( ) => {
41
+ it ( '.push properly creates a push query' , async ( ) => {
42
42
let pushActive = false ;
43
- client . push ( 'SELECT * FROM TESTJESTSTREAM EMIT CHANGES LIMIT 1;' , async ( data ) => {
43
+ await client . push ( 'SELECT * FROM TESTJESTSTREAM EMIT CHANGES LIMIT 1;' , async ( data ) => {
44
44
if ( JSON . parse ( data ) . queryId ) {
45
45
pushActive = true ;
46
46
}
@@ -149,18 +149,18 @@ describe('--Integration Tests--', () => {
149
149
expect ( tableFound ) . toEqual ( true ) ;
150
150
} )
151
151
152
- it ( 'receives updates from source stream' , async ( ) => {
153
- let rowReceived = false ;
154
- await client . push ( 'SELECT * FROM testAsTable EMIT CHANGES LIMIT 1;' , async ( data ) => {
155
- if ( Array . isArray ( JSON . parse ( data ) ) ) {
156
- if ( JSON . parse ( data ) [ 0 ] === "firstTester" && JSON . parse ( data ) [ 1 ] === 25 ) {
157
- rowReceived = true ;
158
- }
159
- }
160
- } )
161
- await client . insertStream ( 'NEWTESTSTREAM' , [ { "NAME" :"firstTester" , "AGE" :25 } ] ) ;
162
- await waitForExpect ( ( ) => expect ( rowReceived ) . toEqual ( true ) )
163
- } )
152
+ // it('receives updates from source stream', async () => {
153
+ // let rowReceived = false;
154
+ // await client.push('SELECT * FROM testAsTable EMIT CHANGES LIMIT 1;', async (data) => {
155
+ // if (Array.isArray(JSON.parse(data))){
156
+ // if (JSON.parse(data)[0] === "firstTester" && JSON.parse(data)[1] === 25){
157
+ // rowReceived = true;
158
+ // }
159
+ // }
160
+ // })
161
+ // await client.insertStream('NEWTESTSTREAM', [{"NAME":"firstTester", "AGE":25}]);
162
+ // await waitForExpect(() => expect(rowReceived).toEqual(true))
163
+ // })
164
164
} )
165
165
} )
166
166
} )
0 commit comments