| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c9af24d commit 733233d
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,16 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + | ||
| 3 | + require('../common'); | ||
| 4 | + const assert = require('assert'); | ||
| 5 | + const debug = require('_debugger'); | ||
| 6 | + | ||
| 7 | + function emit() { | ||
| 8 | + const error = new Error('sterrance'); | ||
| 9 | + process.emit('uncaughtException', error); | ||
| 10 | + } | ||
| 11 | + | ||
| 12 | + assert.doesNotThrow(emit); | ||
| 13 | + | ||
| 14 | + debug.start(['fhqwhgads']); | ||
| 15 | + | ||
| 16 | + emit(); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,17 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + const assert = require('assert'); | ||
| 4 | + const path = require('path'); | ||
| 5 | + const spawnSync = require('child_process').spawnSync; | ||
| 6 | + | ||
| 7 | + const emitUncaught = path.join(common.fixturesDir, 'debug-uncaught.js'); | ||
| 8 | + const result = spawnSync(process.execPath, [emitUncaught], {encoding: 'utf8'}); | ||
| 9 | + | ||
| 10 | + const expectedMessage = | ||
| 11 | + "There was an internal error in Node's debugger. Please report this bug."; | ||
| 12 | + | ||
| 13 | + assert.strictEqual(result.status, 1); | ||
| 14 | + assert(result.stderr.includes(expectedMessage)); | ||
| 15 | + assert(result.stderr.includes('Error: sterrance')); | ||
| 16 | + | ||
| 17 | + console.log(result.stdout); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments