Created
June 26, 2015 17:21
-
-
Save BlackVegetable/7e12a0c3d13bea4b0091 to your computer and use it in GitHub Desktop.
1) Keen IO "after each" hook: TypeError: '[object Object]' is not a function (evaluating 'this.traits({})')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should always refresh global properties with user traits if present', function() { | |
var id = 'Devon Higgins'; | |
var traits = { trait: 'Pretty Neat', id: id }; | |
analytics.user().userId = id; | |
analytics.user().traits = traits; | |
// Notice no identify() call is made here. | |
// This is to emulate a page reload which loses the global | |
// properties that identify() saves. | |
analytics.track('event'); | |
var global_user = keen.client.client.globalProperties().user; | |
analytics.deepEqual(global_user, { userId: id, traits: traits }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment