| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a038fcc commit a64af39
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,27 +8,27 @@ if ('linux freebsd darwin'.indexOf(process.platform) === -1) { | |||
| 8 | 8 | return; | |
| 9 | 9 | } | |
| 10 | 10 | ||
| 11 | - var assert = require('assert'); | ||
| 12 | - var exec = require('child_process').exec; | ||
| 13 | - var path = require('path'); | ||
| 11 | + const assert = require('assert'); | ||
| 12 | + const exec = require('child_process').exec; | ||
| 13 | + const path = require('path'); | ||
| 14 | 14 | ||
| 15 | 15 | // The title shouldn't be too long; libuv's uv_set_process_title() out of | |
| 16 | 16 | // security considerations no longer overwrites envp, only argv, so the | |
| 17 | 17 | // maximum title length is possibly quite short. | |
| 18 | - var title = 'testme'; | ||
| 18 | + let title = 'testme'; | ||
| 19 | 19 | ||
| 20 | - assert.notEqual(process.title, title); | ||
| 20 | + assert.notStrictEqual(process.title, title); | ||
| 21 | 21 | process.title = title; | |
| 22 | - assert.equal(process.title, title); | ||
| 22 | + assert.strictEqual(process.title, title); | ||
| 23 | 23 | ||
| 24 | - exec('ps -p ' + process.pid + ' -o args=', function(error, stdout, stderr) { | ||
| 25 | - assert.equal(error, null); | ||
| 26 | - assert.equal(stderr, ''); | ||
| 24 | + exec(`ps -p ${process.pid} -o args=`, function callback(error, stdout, stderr) { | ||
| 25 | + assert.ifError(error); | ||
| 26 | + assert.strictEqual(stderr, ''); | ||
| 27 | 27 | ||
| 28 | 28 | // freebsd always add ' (procname)' to the process title | |
| 29 | 29 | if (process.platform === 'freebsd') | |
| 30 | 30 | title += ` (${path.basename(process.execPath)})`; | |
| 31 | 31 | ||
| 32 | 32 | // omitting trailing whitespace and \n | |
| 33 | - assert.equal(stdout.replace(/\s+$/, ''), title); | ||
| 33 | + assert.strictEqual(stdout.replace(/\s+$/, ''), title); | ||
| 34 | 34 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments