UNPKG

exiftool-vendored

Version:
30 lines 1.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const IsWin32_1 = require("./IsWin32"); const Which_1 = require("./Which"); const _chai_spec_1 = require("./_chai.spec"); if (!(0, IsWin32_1.isWin32)()) { describe("Which", () => { it("finds perl", async () => { const act = await (0, Which_1.which)("perl"); // macOS is expected to be `/usr/local/bin/perl` or // `/opt/homebrew/bin/perl`. // Most linux distros will use `/usr/bin/perl` or `/bin/perl`. (0, _chai_spec_1.expect)([ "/bin/perl", "/usr/bin/perl", "/usr/local/bin/perl", "/opt/homebrew/bin/perl", ]).to.include(act); }); it("finds node", async () => { const act = await (0, Which_1.which)("node"); (0, _chai_spec_1.expect)(act).to.match(/.\/node$/); }); it("rejects non-existent tool", async () => { const act = await (0, Which_1.which)("no-such-tool-exists-1234567890"); (0, _chai_spec_1.expect)(act).to.eql(undefined); }); }); } //# sourceMappingURL=Which.spec.js.map