Files
gridpilot.gg/tests/smoke/di-container.test.ts
2025-12-16 11:52:26 +01:00

21 lines
845 B
TypeScript

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);
});
});