Add new Jasmine test to ensure Segment.io is called when appropriate
This commit is contained in:
@@ -3,6 +3,11 @@ describe 'Logger', ->
|
||||
expect(window.log_event).toBe Logger.log
|
||||
|
||||
describe 'log', ->
|
||||
it 'send event to Segment.io if event is whitelisted', ->
|
||||
spyOn 'analytics.track'
|
||||
Logger.log 'seq_goto', 'data'
|
||||
expect(analytics.track).toHaveBeenCalledWith 'seq_goto', 'data'
|
||||
|
||||
it 'send a request to log event', ->
|
||||
spyOn $, 'getWithPrefix'
|
||||
Logger.log 'example', 'data'
|
||||
|
||||
Reference in New Issue
Block a user