"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const vitest_1 = require("vitest");
const file_js_1 = require("./file.js");
(0, vitest_1.describe)('is readable file constructor', () => {
    (0, vitest_1.test)('with string conetent', async () => {
        (0, vitest_1.expect)((0, file_js_1.isReadableFileConstructor)({
            name: 'test_file_name.csv',
            contents: '1,2,3', // plain text csv content
            type: 'text/csv'
        })).toBeTruthy();
    });
    (0, vitest_1.test)('with Buffer.toJSON() conetent', async () => {
        (0, vitest_1.expect)((0, file_js_1.isReadableFileConstructor)({
            name: 'test_file_name.csv',
            contents: Buffer.from('1,2,3').toJSON(), // plain text csv content
            type: 'text/csv'
        })).toBeTruthy();
    });
    (0, vitest_1.test)('not readable files', async () => {
        (0, vitest_1.expect)((0, file_js_1.isReadableFileConstructor)({
            name: 'test_file_name.csv',
            contents: [],
            type: 'text/csv'
        })).toBeFalsy();
        (0, vitest_1.expect)((0, file_js_1.isReadableFileConstructor)({
            name: 'test_file_name.csv',
            contents: {},
            type: 'text/csv'
        })).toBeFalsy();
        (0, vitest_1.expect)((0, file_js_1.isReadableFileConstructor)({
            name: 'test_file_name.csv',
            contents: Buffer.from('1,2,3'), // plain text csv content
            type: 'text/csv'
        })).toBeFalsy();
    });
});
//# sourceMappingURL=file.test.js.map