jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
13 lines • 563 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFullExtension = getFullExtension;
const tslib_1 = require("tslib");
const node_path_1 = tslib_1.__importDefault(require("node:path"));
function getFullExtension(filePath) {
if (!filePath || filePath === '.' || filePath === '..')
return '';
const fileName = node_path_1.default.basename(filePath);
const lastDotIndex = fileName.indexOf('.');
return lastDotIndex === -1 ? '' : fileName.slice(lastDotIndex);
}
//# sourceMappingURL=getFullExtension.js.map