Skip to content

Commit

Permalink
Add set/get Config #13
Browse files Browse the repository at this point in the history
  • Loading branch information
a6b8 committed Mar 17, 2024
1 parent 557f52e commit ca8cddf
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions tests/circle-ci.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,29 @@ const routes = [

const exporter = new Exporter( { 'silent': false, 'emitEvents': true } )
exporter.setRoutes( { routes } )
const result = exporter.sendData( {
exporter.sendData( {
'routeId': 'myRoute',
'obj': { 'id': '1', 'foo': 'bar' }
} )

if( result === true ) {
console.log( 'Success' )
process.exit( 0 )
} else {
console.log( 'Failure' )
process.exit( 1 )
}

exporter.on(
'exporterRouteLoopUpdate',
( eventResponse ) => {
exporter.printRouteStatus( {
'symbol': `📅`,
'operation': 'Event',
eventResponse
} )
console.log( 'Success' )
process.exit( 0 )
}
)


// wait for 5000 ms to let the exporter send the data

const delay = 5000
await new Promise( resolve => setTimeout( resolve, delay ) )
console.log( 'Event not received.' )
process.exit( 1 )

0 comments on commit ca8cddf

Please # to comment.