GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: add abort test for backtrace validation · nodejs/node@517e715

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/abort
    • test-abort-backtrace.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/abort/test-abort-backtrace.js‎

Copy file name to clipboard
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use strict';
2+
const common = require('../common');
3+
const assert = require('assert');
4+
const cp = require('child_process');
5+
6+
if (common.isWindows) {
7+
common.skip('Backtraces unimplemented on Windows.');
8+
return;
9+
}
10+
11+
if (process.argv[2] === 'child') {
12+
process.abort();
13+
} else {
14+
const child = cp.spawnSync(`${process.execPath}`, [`${__filename}`, 'child']);
15+
const frames =
16+
child.stderr.toString().trimRight().split('\n').map((s) => s.trim());
17+
18+
assert.strictEqual(child.stdout.toString(), '');
19+
assert.ok(frames.length > 0);
20+
// All frames should start with a frame number.
21+
assert.ok(frames.every((frame, index) => frame.startsWith(`${index + 1}:`)));
22+
// At least some of the frames should include the binary name.
23+
assert.ok(frames.some((frame) => frame.includes(`[${process.execPath}]`)));
24+
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.