diff --git a/packages/analytics/__tests__/analytics.test.ts b/packages/analytics/__tests__/analytics.test.ts index 588997fa0b..209452dd2b 100644 --- a/packages/analytics/__tests__/analytics.test.ts +++ b/packages/analytics/__tests__/analytics.test.ts @@ -881,6 +881,15 @@ describe('Analytics', function () { expect(initiateOnDeviceConversionMeasurementWithHashedEmailAddress).toBeDefined(); }); + it('`initiateOnDeviceConversionMeasurementWithHashedEmailAddress` throws if not a string', function () { + expect(() => + // @ts-ignore + firebase.analytics().initiateOnDeviceConversionMeasurementWithHashedEmailAddress(true), + ).toThrowError( + "firebase.analytics().initiateOnDeviceConversionMeasurementWithHashedEmailAddress(*) 'hashedEmailAddress' expected a string value.", + ); + }); + it('`initiateOnDeviceConversionMeasurementWithHashedPhoneNumber` should throw if the value is in E.164 format', function () { expect(() => initiateOnDeviceConversionMeasurementWithHashedPhoneNumber(getAnalytics(), '+1234567890'),