- Implemented AlertDialog component with overlay, content, header, footer, title, description, action, and cancel functionalities. - Created Badge component with variant support for different styles. - Developed Checkbox component with custom styling and indicator. - Added Dialog component with trigger, close, overlay, content, header, footer, title, and description. - Introduced Label component for form elements. - Built Select component with trigger, content, group, item, label, separator, and scroll buttons. - Created Sheet component with trigger, close, overlay, content, header, footer, title, and description. - Implemented Table component with header, body, footer, row, head, cell, and caption. - Added Textarea component with custom styling. - Established API service for game management with CRUD operations and metadata search functionalities. - Updated dependencies in package lock files.
28 lines
1.3 KiB
JavaScript
28 lines
1.3 KiB
JavaScript
"use strict";
|
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const vitest_1 = require("vitest");
|
|
const path_1 = __importDefault(require("path"));
|
|
const fsScanner_1 = require("../../src/services/fsScanner");
|
|
const fixturesDir = path_1.default.join(__dirname, '..', 'fixtures');
|
|
const emptyDir = path_1.default.join(fixturesDir, 'empty');
|
|
(0, vitest_1.describe)('services/fsScanner', () => {
|
|
(0, vitest_1.it)('exporta scanDirectory', () => {
|
|
(0, vitest_1.expect)(typeof fsScanner_1.scanDirectory).toBe('function');
|
|
});
|
|
(0, vitest_1.it)('carpeta vacía devuelve array', async () => {
|
|
const res = await (0, fsScanner_1.scanDirectory)(emptyDir);
|
|
(0, vitest_1.expect)(Array.isArray(res)).toBe(true);
|
|
(0, vitest_1.expect)(res.length).toBe(0);
|
|
});
|
|
(0, vitest_1.it)('detecta simple-rom.bin', async () => {
|
|
const res = await (0, fsScanner_1.scanDirectory)(fixturesDir);
|
|
const found = res.find((r) => r.filename === 'simple-rom.bin' || r.name === 'simple-rom.bin');
|
|
(0, vitest_1.expect)(found).toBeTruthy();
|
|
(0, vitest_1.expect)(found.size).toBeGreaterThan(0);
|
|
(0, vitest_1.expect)(found.format).toBeDefined();
|
|
});
|
|
});
|