jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
31 lines • 951 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.inferMimeType = void 0;
const node_path_1 = require("node:path");
const inferMimeType = (context) => {
return context.sourcePath ? mimeTypes[(0, node_path_1.extname)(context.sourcePath)] : undefined;
};
exports.inferMimeType = inferMimeType;
const mimeTypes = {
'.png': 'image/png',
'.jpg': 'image/jpeg',
'.jpeg': 'image/jpeg',
'.gif': 'image/gif',
'.svg': 'image/svg+xml',
'.webp': 'image/webp',
'.mp4': 'video/mp4',
'.webm': 'video/webm',
'.ogg': 'video/ogg',
'.json': 'application/json',
'.pdf': 'application/pdf',
'.zip': 'application/zip',
'.tar': 'application/x-tar',
'.gz': 'application/gzip',
'.js': 'application/javascript',
'.css': 'text/css',
'.html': 'text/html',
'.txt': 'text/plain',
'.csv': 'text/csv',
'.xml': 'text/xml',
};
//# sourceMappingURL=inferMimeType.js.map