File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ var Heap = module.exports = integration('Heap')
1414 . endpoint ( 'https://heapanalytics.com/api' )
1515 . channels ( [ 'server' , 'mobile' ] )
1616 . ensure ( 'settings.appId' )
17+ . ensure ( 'message.userId' ) // Heap drops all anonymous events anyway so no need to send without this
1718 . mapper ( mapper )
1819 . retries ( 2 ) ;
1920
Original file line number Diff line number Diff line change @@ -25,16 +25,21 @@ describe('Heap', function () {
2525 . name ( 'Heap' )
2626 . endpoint ( 'https://heapanalytics.com/api' )
2727 . ensure ( 'settings.appId' )
28+ . ensure ( 'message.userId' )
2829 . channels ( [ 'mobile' , 'server' ] ) ;
2930 } ) ;
3031
3132 describe ( '.validate()' , function ( ) {
3233 it ( 'should be invalid without appId' , function ( ) {
33- test . invalid ( { } , { } ) ;
34+ test . invalid ( { userId : 'han' } , { } ) ;
3435 } ) ;
3536
3637 it ( 'should be valid with appId' , function ( ) {
37- test . valid ( { } , settings ) ;
38+ test . valid ( { userId : 'han' } , settings ) ;
39+ } ) ;
40+
41+ it ( 'should be invalid if message does not contain userId' , function ( ) {
42+ test . invalid ( { } , settings ) ;
3843 } ) ;
3944 } ) ;
4045
You can’t perform that action at this time.
0 commit comments