Skip to content

Commit

Permalink
fix m1 spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Feb 10, 2024
1 parent 536b8fe commit 24779ca
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Which.spec.ts
Expand Up @@ -6,9 +6,16 @@ if (!isWin32()) {
describe("Which", () => {
it("finds perl", async () => {
const act = await which("perl")
// macOS is `/usr/local/bin/perl`. Most linux distros will use
// `/usr/bin/perl`, but could be `/bin/perl` and still be valid.
expect(act).to.match(/^(\/usr(\/local)?)?\/bin\/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`.
expect([
"/bin/perl",
"/usr/bin/perl",
"/usr/local/bin/perl",
"/opt/homebrew/bin/perl",
]).to.include(act)
})
it("finds node", async () => {
const act = await which("node")
Expand Down

0 comments on commit 24779ca

Please sign in to comment.