import { describe, it, expect } from 'vitest';
import { getWebsitePublicEnv, getWebsiteServerEnv, isTruthyEnv } from './env';

describe('env', () => {
  it('should be defined', () => {
    expect(getWebsiteServerEnv()).toBeDefined();
    expect(getWebsitePublicEnv()).toBeDefined();
  });

  it('should interpret truthy env strings', () => {
    expect(isTruthyEnv(undefined)).toBe(false);
    expect(isTruthyEnv('0')).toBe(false);
    expect(isTruthyEnv('false')).toBe(false);
    expect(isTruthyEnv('TRUE')).toBe(true);
    expect(isTruthyEnv('1')).toBe(true);
  });
});
