How to use the @spartacus/core.isFeatureLevel function in @spartacus/core

To help you get started, we’ve selected a few @spartacus/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return false for negate values', () => {
        expect(isFeatureLevel(config, '!1.2')).toBeFalsy();
        expect(isFeatureLevel(config, '!1.3')).toBeFalsy();
        expect(isFeatureLevel(config, '!1.5')).toBeTruthy();
      });
    });
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return true for equal levels', () => {
        expect(isFeatureLevel(config, '1.3')).toBeTruthy();
        expect(isFeatureLevel(config, '1.3.0')).toBeTruthy();
      });
      it('should return false for higher levels', () => {
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return true for lower levels', () => {
        expect(isFeatureLevel(config, '1.0')).toBeTruthy();
        expect(isFeatureLevel(config, '1.02')).toBeTruthy();
        expect(isFeatureLevel(config, '1.2.9')).toBeTruthy();
      });
      it('should return true for equal levels', () => {
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return false for higher levels', () => {
        expect(isFeatureLevel(config, '1.5')).toBeFalsy();
        expect(isFeatureLevel(config, '2.0')).toBeFalsy();
        expect(isFeatureLevel(config, '1.3.1')).toBeFalsy();
        expect(isFeatureLevel(config, '1.20')).toBeFalsy();
      });
      it('should return false for negate values', () => {
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return true for lower levels', () => {
        expect(isFeatureLevel(config, '1.0')).toBeTruthy();
        expect(isFeatureLevel(config, '1.02')).toBeTruthy();
        expect(isFeatureLevel(config, '1.2.9')).toBeTruthy();
      });
      it('should return true for equal levels', () => {
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return false for negate values', () => {
        expect(isFeatureLevel(config, '!1.2')).toBeFalsy();
        expect(isFeatureLevel(config, '!1.3')).toBeFalsy();
        expect(isFeatureLevel(config, '!1.5')).toBeTruthy();
      });
    });
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return correct value if feature level is set to * (latest)', () => {
      const config: FeaturesConfig = {
        features: {
          level: '*',
        },
      };
      expect(isFeatureLevel(config, '1.2')).toBeTruthy();
      expect(isFeatureLevel(config, '2.0')).toBeTruthy();
    });
  });
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return correct value if feature level is set to * (latest)', () => {
      const config: FeaturesConfig = {
        features: {
          level: '*',
        },
      };
      expect(isFeatureLevel(config, '1.2')).toBeTruthy();
      expect(isFeatureLevel(config, '2.0')).toBeTruthy();
    });
  });
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return false for negate values', () => {
        expect(isFeatureLevel(config, '!1.2')).toBeFalsy();
        expect(isFeatureLevel(config, '!1.3')).toBeFalsy();
        expect(isFeatureLevel(config, '!1.5')).toBeTruthy();
      });
    });
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / features-config / utils / feature-config-utils.spec.ts View on Github external
it('should return false for higher levels', () => {
        expect(isFeatureLevel(config, '1.5')).toBeFalsy();
        expect(isFeatureLevel(config, '2.0')).toBeFalsy();
        expect(isFeatureLevel(config, '1.3.1')).toBeFalsy();
        expect(isFeatureLevel(config, '1.20')).toBeFalsy();
      });
      it('should return false for negate values', () => {