node/test/parallel/test-process-title-cli.js
James M Snell 9d71619bbe src: add --title command line argument
Simple utility command line argument for setting the process
title on process startup.

PR-URL: https://github.com/nodejs/node/pull/21477
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-07-10 16:16:37 -07:00

14 lines
322 B
JavaScript

// Flags: --title=foo
'use strict';
const common = require('../common');
if (common.isSunOS)
common.skip(`Unsupported platform [${process.platform}]`);
const assert = require('assert');
// Verifies that the --title=foo command line flag set the process
// title on startup.
assert.strictEqual(process.title, 'foo');