fix: Fix event-tracker being passed no options object

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
Cameron Diver 2018-09-04 15:57:50 -07:00
parent c1748436d8
commit 08b1c90ea1
No known key found for this signature in database
GPG Key ID: 69264F9C923F55C1
2 changed files with 4 additions and 1 deletions

View File

@ -62,7 +62,7 @@ export class EventTracker {
public track(
event: string,
properties: EventTrackProperties | Error,
properties: EventTrackProperties | Error = { },
) {
if (properties instanceof Error) {

View File

@ -87,6 +87,9 @@ describe 'EventTracker', ->
supervisorVersion
})
it 'should handle being passed no properties object', ->
expect(@eventTracker.track('no-options')).to.not.throw
describe 'Rate limiting', ->
it 'should rate limit events of the same type', ->