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: improve assertion messages · nodejs/node@8311561

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-domain-safe-exit.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-domain-safe-exit.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-domain-safe-exit.js
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,21 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23+
require('../common');
2324
// Make sure the domain stack doesn't get clobbered by un-matched .exit()
2425

25-
require('../common');
2626
const assert = require('assert');
2727
const domain = require('domain');
28+
const util = require('util');
2829

2930
const a = domain.create();
3031
const b = domain.create();
3132

3233
a.enter(); // push
3334
b.enter(); // push
34-
assert.deepStrictEqual(domain._stack, [a, b], 'b not pushed');
35+
assert.deepStrictEqual(domain._stack, [a, b], 'Unexpected stack shape ' +
36+
`(domain._stack = ${util.inspect(domain._stack)})`);
3537

3638
domain.create().exit(); // no-op
37-
assert.deepStrictEqual(domain._stack, [a, b], 'stack mangled!');
39+
assert.deepStrictEqual(domain._stack, [a, b], 'Unexpected stack shape ' +
40+
`(domain._stack = ${util.inspect(domain._stack)})`);

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.