@@ -48,6 +48,63 @@ describe("isNodeVersionManagerRuntime", () => {
|
48 | 48 | it("returns false for non-nvm node paths", () => { |
49 | 49 | expect(isNodeVersionManagerRuntime({}, "/usr/bin/node")).toBe(false); |
50 | 50 | }); |
| 51 | + |
| 52 | +it("detects fnm via execPath", () => { |
| 53 | +expect( |
| 54 | +isNodeVersionManagerRuntime({}, "/home/test/.fnm/node-versions/v22/installation/bin/node"), |
| 55 | +).toBe(true); |
| 56 | +}); |
| 57 | + |
| 58 | +it("detects fnm via XDG data path", () => { |
| 59 | +expect( |
| 60 | +isNodeVersionManagerRuntime( |
| 61 | +{}, |
| 62 | +"/home/test/.local/share/fnm/node-versions/v22/installation/bin/node", |
| 63 | +), |
| 64 | +).toBe(true); |
| 65 | +}); |
| 66 | + |
| 67 | +it("detects nvs via dotted home path", () => { |
| 68 | +expect(isNodeVersionManagerRuntime({}, "/home/test/.nvs/node/22.14.0/x64/bin/node")).toBe(true); |
| 69 | +}); |
| 70 | + |
| 71 | +it("detects volta via execPath", () => { |
| 72 | +expect( |
| 73 | +isNodeVersionManagerRuntime({}, "/home/test/.volta/tools/image/node/22.14.0/bin/node"), |
| 74 | +).toBe(true); |
| 75 | +}); |
| 76 | + |
| 77 | +it("detects asdf via execPath", () => { |
| 78 | +expect( |
| 79 | +isNodeVersionManagerRuntime({}, "/home/test/.asdf/installs/nodejs/22.14.0/bin/node"), |
| 80 | +).toBe(true); |
| 81 | +}); |
| 82 | + |
| 83 | +it("detects mise via execPath", () => { |
| 84 | +expect( |
| 85 | +isNodeVersionManagerRuntime({}, "/home/test/.local/share/mise/installs/node/22.14.0/bin/node"), |
| 86 | +).toBe(true); |
| 87 | +}); |
| 88 | + |
| 89 | +it("detects n via execPath", () => { |
| 90 | +expect(isNodeVersionManagerRuntime({}, "/home/test/.n/bin/node")).toBe(true); |
| 91 | +}); |
| 92 | + |
| 93 | +it("detects nodenv via execPath", () => { |
| 94 | +expect(isNodeVersionManagerRuntime({}, "/home/test/.nodenv/versions/22.14.0/bin/node")).toBe( |
| 95 | +true, |
| 96 | +); |
| 97 | +}); |
| 98 | + |
| 99 | +it("detects nodebrew via execPath", () => { |
| 100 | +expect(isNodeVersionManagerRuntime({}, "/home/test/.nodebrew/node/v22.14.0/bin/node")).toBe( |
| 101 | +true, |
| 102 | +); |
| 103 | +}); |
| 104 | + |
| 105 | +it("detects nvs via execPath", () => { |
| 106 | +expect(isNodeVersionManagerRuntime({}, "/home/test/nvs/node/22.14.0/x64/bin/node")).toBe(true); |
| 107 | +}); |
51 | 108 | }); |
52 | 109 | |
53 | 110 | describe("resolveAutoNodeExtraCaCerts", () => { |
|