| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ad9c4bd commit 30a4248
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,8 @@ | |||
| 6 | 6 | "positional-args": "positional-args", | |
| 7 | 7 | "positional-args-windows": "positional-args.bat", | |
| 8 | 8 | "custom-env": "custom-env", | |
| 9 | - "custom-env-windows": "custom-env.bat" | ||
| 9 | + "custom-env-windows": "custom-env.bat", | ||
| 10 | + "path-env": "path-env", | ||
| 11 | + "path-env-windows": "path-env.bat" | ||
| 10 | 12 | } | |
| 11 | 13 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,3 +8,5 @@ Available scripts are: | |||
| 8 | 8 | positional-args-windows: positional-args.bat | |
| 9 | 9 | custom-env: custom-env | |
| 10 | 10 | custom-env-windows: custom-env.bat | |
| 11 | + path-env: path-env | ||
| 12 | + path-env-windows: path-env.bat | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,4 +64,15 @@ describe('node run [command]', () => { | |||
| 64 | 64 | assert.strictEqual(child.stderr, ''); | |
| 65 | 65 | assert.strictEqual(child.code, 0); | |
| 66 | 66 | }); | |
| 67 | + | ||
| 68 | + it('should set PATH environment variable to node_modules/.bin', async () => { | ||
| 69 | + const child = await common.spawnPromisified( | ||
| 70 | + process.execPath, | ||
| 71 | + [ '--no-warnings', '--run', `path-env${envSuffix}`], | ||
| 72 | + { cwd: fixtures.path('run-script') }, | ||
| 73 | + ); | ||
| 74 | + assert.ok(child.stdout.includes(fixtures.path('run-script/node_modules/.bin'))); | ||
| 75 | + assert.strictEqual(child.stderr, ''); | ||
| 76 | + assert.strictEqual(child.code, 0); | ||
| 77 | + }); | ||
| 67 | 78 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments