@cucumber/cucumber
Version:
The official JavaScript implementation of Cucumber.
16 lines • 632 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatLocation = formatLocation;
const node_path_1 = __importDefault(require("node:path"));
const value_checker_1 = require("../../value_checker");
function formatLocation(obj, cwd) {
let uri = obj.uri;
if ((0, value_checker_1.doesHaveValue)(cwd)) {
uri = node_path_1.default.relative(cwd, uri);
}
return `${uri}:${obj.line.toString()}`;
}
//# sourceMappingURL=location_helpers.js.map
;