| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 485bb1b commit 3801790
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,21 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + | ||
| 3 | + const common = require('../common'); | ||
| 4 | + const assert = require('assert'); | ||
| 5 | + const execFile = require('child_process').execFile; | ||
| 6 | + const path = require('path'); | ||
| 7 | + | ||
| 8 | + const fixture = path.join(common.fixturesDir, 'exit.js'); | ||
| 9 | + | ||
| 10 | + { | ||
| 11 | + execFile( | ||
| 12 | + process.execPath, | ||
| 13 | + [fixture, 42], | ||
| 14 | + common.mustCall((e) => { | ||
| 15 | + // Check that arguments are included in message | ||
| 16 | + assert.strictEqual(e.message.trim(), | ||
| 17 | + `Command failed: ${process.execPath} ${fixture} 42`); | ||
| 18 | + assert.strictEqual(e.code, 42); | ||
| 19 | + }) | ||
| 20 | + ); | ||
| 21 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments