@@ -28,6 +28,9 @@ describe('eventstore', function () {
28
28
expect ( es ) . to . be . a ( 'object' ) ;
29
29
expect ( es . useEventPublisher ) . to . be . a ( 'function' ) ;
30
30
expect ( es . init ) . to . be . a ( 'function' ) ;
31
+ expect ( es . streamEvents ) . to . be . a ( 'function' ) ;
32
+ expect ( es . streamEventsSince ) . to . be . a ( 'function' ) ;
33
+ expect ( es . streamEventsByRevision ) . to . be . a ( 'function' ) ;
31
34
expect ( es . getEvents ) . to . be . a ( 'function' ) ;
32
35
expect ( es . getEventsSince ) . to . be . a ( 'function' ) ;
33
36
expect ( es . getEventsByRevision ) . to . be . a ( 'function' ) ;
@@ -1544,7 +1547,7 @@ describe('eventstore', function () {
1544
1547
} ) ;
1545
1548
} ) ;
1546
1549
1547
- describe ( 'requesting existing events since a date and using next function ' , function ( ) {
1550
+ describe ( 'requesting existing events since a date' , function ( ) {
1548
1551
describe ( 'and committing some new events' , function ( ) {
1549
1552
it ( 'it should work as expected' , function ( done ) {
1550
1553
var evts = [ ] ;
@@ -1559,6 +1562,23 @@ describe('eventstore', function () {
1559
1562
} ) ;
1560
1563
} ) ;
1561
1564
} ) ;
1565
+ describe ( 'requesting existing events by revision' , function ( ) {
1566
+ describe ( 'and committing some new events' , function ( ) {
1567
+ it ( 'it should work as expected' , function ( done ) {
1568
+ var evts = [ ] ;
1569
+ var stream = es . streamEventsByRevision ( 'myAggId2' , 0 , 3 ) ;
1570
+ stream . on ( 'data' , function ( e ) {
1571
+ console . log ( 'mitkot' ) ;
1572
+ evts . push ( e ) ;
1573
+ } ) ;
1574
+ stream . on ( 'end' , function ( ) {
1575
+ expect ( evts . length ) . to . eql ( 3 ) ;
1576
+ done ( ) ;
1577
+ } ) ;
1578
+ } ) ;
1579
+ } ) ;
1580
+ } ) ;
1581
+
1562
1582
} ) ;
1563
1583
}
1564
1584
0 commit comments