mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
1a2f579ba0
Split up test-domain into multiple, more focused test files and use more modern JS inside of them. PR-URL: https://github.com/nodejs/node/pull/13614 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
14 lines
327 B
JavaScript
14 lines
327 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const domain = require('domain');
|
|
|
|
const d = new domain.Domain();
|
|
|
|
assert.strictEqual(d.run(() => 'return value'),
|
|
'return value');
|
|
|
|
assert.strictEqual(d.run((a, b) => `${a} ${b}`, 'return', 'value'),
|
|
'return value');
|