/**
 * Tests for App container constants
 *
 * Covers newly added URL type constants: EXTERNAL_URL, URL, SITE_URL
 */

import {
  EXTERNAL_URL,
  URL,
  SITE_URL,
  LOYALTY,
  FAILURE,
  DATE_DISPLAY_FORMAT,
  TIME_DISPLAY_FORMAT,
} from '../constants';

describe('App constants', () => {
  describe('URL type constants', () => {
    it('should export EXTERNAL_URL with correct value', () => {
      expect(EXTERNAL_URL).toBe('EXTERNAL_URL');
    });

    it('should export URL with correct value', () => {
      expect(URL).toBe('URL');
    });

    it('should export SITE_URL with correct value', () => {
      expect(SITE_URL).toBe('SITE_URL');
    });

    it('should have distinct values for all three URL constants', () => {
      expect(EXTERNAL_URL).not.toBe(URL);
      expect(EXTERNAL_URL).not.toBe(SITE_URL);
      expect(URL).not.toBe(SITE_URL);
    });

    it('should be strings', () => {
      expect(typeof EXTERNAL_URL).toBe('string');
      expect(typeof URL).toBe('string');
      expect(typeof SITE_URL).toBe('string');
    });
  });

  describe('Other existing constants still exported correctly', () => {
    it('should export LOYALTY', () => {
      expect(LOYALTY).toBe('loyalty');
    });

    it('should export FAILURE', () => {
      expect(FAILURE).toBe('FAILURE');
    });

    it('should export DATE_DISPLAY_FORMAT', () => {
      expect(DATE_DISPLAY_FORMAT).toBe('D MMM YYYY');
    });

    it('should export TIME_DISPLAY_FORMAT', () => {
      expect(TIME_DISPLAY_FORMAT).toBe('hh:mm A');
    });
  });
});
