import { AmbientLight, Color, Object3D } from 'three';
import DIVEAmbientLight from '../AmbientLight';

describe('dive/light/DIVEAmbientLight', () => {
    it('should instantiate', () => {
        const testLight = new DIVEAmbientLight();
        expect(testLight).toBeDefined();
    });

    it('should set intensity', () => {
        const testLight = new DIVEAmbientLight();
        testLight.SetIntensity(1.0);
        expect((testLight.children[0] as AmbientLight).intensity).toBe(1.0);
    });

    it('should set color', () => {
        const testLight = new DIVEAmbientLight();
        testLight.SetColor({ test: true } as unknown as Color);
        expect((testLight.children[0] as AmbientLight).color).toEqual({
            test: true,
        });
    });

    it('should set enabled', () => {
        const testLight = new DIVEAmbientLight();
        testLight.SetEnabled(false);
        expect(testLight.children[0].visible).toBe(false);
    });
});
