From 90e0d9f2e9489393db312937637f41273b5b534b Mon Sep 17 00:00:00 2001 From: Robert Ing Date: Wed, 1 May 2024 11:44:16 -0400 Subject: [PATCH] Add test --- test/tests.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/tests.js b/test/tests.js index fcb69db..a4db635 100644 --- a/test/tests.js +++ b/test/tests.js @@ -254,6 +254,7 @@ describe('Braze Forwarder', function() { return { userIdentities: { customerid: 'abc', + email: 'email@gmail.com' }, }; }, @@ -970,6 +971,16 @@ describe('Braze Forwarder', function() { delete mParticle.getVersion; }); + it('should set an identity on the user upon kit initialization', function() { + mParticle.forwarder.init({ + apiKey: '123456', + userIdentificationType: 'Email', + }); + + window.braze.userId.should.equal('email@gmail.com'); + window.braze.getUser().emailSet.should.equal('email@gmail.com'); + }); + it('should set main braze user identity from userIdentificationType ', function() { mParticle.forwarder.init({ apiKey: '123456',