feat: add UI components for alert dialog, badge, checkbox, dialog, label, select, sheet, table, textarea
- 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.
This commit is contained in:
23
backend/dist/tests/services/checksumService.stream.spec.js
vendored
Normal file
23
backend/dist/tests/services/checksumService.stream.spec.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"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 stream_1 = require("stream");
|
||||
const promises_1 = __importDefault(require("fs/promises"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const checksumService_1 = require("../../src/services/checksumService");
|
||||
(0, vitest_1.describe)('services/checksumService (stream)', () => {
|
||||
(0, vitest_1.it)('computeHashesFromStream produces same result as computeHashes(file)', async () => {
|
||||
const data = Buffer.from('quasar-stream-test');
|
||||
const tmpDir = await promises_1.default.mkdtemp(path_1.default.join(process.cwd(), 'tmp-checksum-'));
|
||||
const tmpFile = path_1.default.join(tmpDir, 'test.bin');
|
||||
await promises_1.default.writeFile(tmpFile, data);
|
||||
const expected = await (0, checksumService_1.computeHashes)(tmpFile);
|
||||
const rs = stream_1.Readable.from([data]);
|
||||
const actual = await (0, checksumService_1.computeHashesFromStream)(rs);
|
||||
(0, vitest_1.expect)(actual).toEqual(expected);
|
||||
await promises_1.default.rm(tmpDir, { recursive: true, force: true });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user