import { describe, it, expect } from 'vitest';
import { DIContainer, resolveTemplatePath, resolveSessionDataPath } from '@apps/companion/main/di-container';

describe('DIContainer (smoke) - test-tolerance', () => {
  it('constructs without electron.app and exposes path resolvers', () => {
    // Constructing DIContainer should not throw in plain Node (vitest) environment.
    expect(() => {
      // Note: getInstance lazily constructs the container
      DIContainer.resetInstance();
      DIContainer.getInstance();
    }).not.toThrow();

    // Path resolvers should return strings
    const tpl = resolveTemplatePath();
    const sess = resolveSessionDataPath();
    expect(typeof tpl).toBe('string');
    expect(tpl.length).toBeGreaterThan(0);
    expect(typeof sess).toBe('string');
    expect(sess.length).toBeGreaterThan(0);
  });
});