"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const react_2 = require("@testing-library/react");
require("@testing-library/jest-dom");
const FileDetails_1 = __importDefault(require("./FileDetails"));
describe('FileDetails', () => {
    it('should render file details', () => {
        const { container } = (0, react_2.render)(react_1.default.createElement(FileDetails_1.default, { fileName: "test.txt" }));
        expect(container).toMatchSnapshot();
    });
    it('should render file details correctly if an extension we support is passed in', () => {
        (0, react_2.render)(react_1.default.createElement(FileDetails_1.default, { fileName: "test.txt", languageTestId: "language" }));
        expect(react_2.screen.getByText('test')).toBeTruthy();
        expect(react_2.screen.getByText('TEXT')).toBeTruthy();
        expect(react_2.screen.getByTestId('language')).toBeTruthy();
    });
    it('should skip language if we do not support an extension', () => {
        (0, react_2.render)(react_1.default.createElement(FileDetails_1.default, { fileName: "test.joke", languageTestId: "language" }));
        expect(react_2.screen.getByText('test')).toBeTruthy();
        expect(react_2.screen.queryByTestId('language')).toBeFalsy();
    });
});
