@webex/webex-core 3.11.0-next.4 → 3.11.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -815,6 +815,57 @@ describe('webex-core', () => {
815
815
  });
816
816
  });
817
817
 
818
+ describe('#isIntegrationEnvironment', () => {
819
+ it('returns true when u2c URL contains "intb"', () => {
820
+ services.webex.config = {
821
+ services: {
822
+ discovery: {
823
+ u2c: 'https://u2c-intb.ciscospark.com/u2c/api/v1',
824
+ },
825
+ },
826
+ };
827
+ assert.isTrue(services.isIntegrationEnvironment());
828
+ });
829
+
830
+ it('returns false when u2c URL does not contain "intb" (production)', () => {
831
+ services.webex.config = {
832
+ services: {
833
+ discovery: {
834
+ u2c: 'https://u2c.wbx2.com/u2c/api/v1',
835
+ },
836
+ },
837
+ };
838
+ assert.isFalse(services.isIntegrationEnvironment());
839
+ });
840
+
841
+ it('returns false when u2c URL is for FedRAMP', () => {
842
+ services.webex.config = {
843
+ services: {
844
+ discovery: {
845
+ u2c: 'https://u2c.gov.ciscospark.com/u2c/api/v1',
846
+ },
847
+ },
848
+ };
849
+ assert.isFalse(services.isIntegrationEnvironment());
850
+ });
851
+
852
+ it('returns false when u2c URL is undefined', () => {
853
+ services.webex.config = {
854
+ services: {
855
+ discovery: {
856
+ u2c: undefined,
857
+ },
858
+ },
859
+ };
860
+ assert.isFalse(services.isIntegrationEnvironment());
861
+ });
862
+
863
+ it('returns false when config is not available', () => {
864
+ services.webex.config = undefined;
865
+ assert.isFalse(services.isIntegrationEnvironment());
866
+ });
867
+ });
868
+
818
869
  describe('U2C catalog cache behavior (v2)', () => {
819
870
  const CATALOG_CACHE_KEY_V2 = 'services.v2.u2cHostMap';
820
871
  let windowBackup;