<?php

declare(strict_types=1);

namespace Tests\Unit\Framework\Development\HotReload;

use App\Framework\Development\HotReload\ReloadType;

describe('ReloadType', function () {
    it('has FULL reload type', function () {
        expect(ReloadType::FULL->value)->toBe('full');
    });

    it('has CSS reload type', function () {
        expect(ReloadType::CSS->value)->toBe('css');
    });

    it('has HMR reload type', function () {
        expect(ReloadType::HMR->value)->toBe('hmr');
    });

    it('has PARTIAL reload type', function () {
        expect(ReloadType::PARTIAL->value)->toBe('partial');
    });

    it('can be created from cases', function () {
        expect(ReloadType::cases())->toHaveCount(4);
        expect(ReloadType::cases())->toContain(ReloadType::FULL);
        expect(ReloadType::cases())->toContain(ReloadType::CSS);
        expect(ReloadType::cases())->toContain(ReloadType::HMR);
        expect(ReloadType::cases())->toContain(ReloadType::PARTIAL);
    });

    it('can be compared', function () {
        expect(ReloadType::FULL)->toBe(ReloadType::FULL);
        expect(ReloadType::CSS)->not->toBe(ReloadType::FULL);
    });
});
