| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1dae187 commit f94336f
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -302,7 +302,7 @@ function REPLServer(prompt, | |||
| 302 | 302 | ||
| 303 | 303 | if (options.terminal && options.useColors === undefined) { | |
| 304 | 304 | // If possible, check if stdout supports colors or not. | |
| 305 | - options.useColors = shouldColorize(options.output) || process.env.NODE_DISABLE_COLORS === undefined; | ||
| 305 | + options.useColors = shouldColorize(options.output); | ||
| 306 | 306 | } | |
| 307 | 307 | ||
| 308 | 308 | // TODO(devsnek): Add a test case for custom eval functions. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ const { REPL_MODE_SLOPPY, REPL_MODE_STRICT } = require('repl'); | |||
| 13 | 13 | const tests = [ | |
| 14 | 14 | { | |
| 15 | 15 | env: {}, | |
| 16 | - expected: { terminal: true, useColors: true } | ||
| 16 | + expected: { terminal: true, useColors: false } | ||
| 17 | 17 | }, | |
| 18 | 18 | { | |
| 19 | 19 | env: { NODE_DISABLE_COLORS: '1' }, | |
@@ -29,7 +29,7 @@ const tests = [ | |||
| 29 | 29 | }, | |
| 30 | 30 | { | |
| 31 | 31 | env: { TERM: 'dumb' }, | |
| 32 | - expected: { terminal: true, useColors: true } | ||
| 32 | + expected: { terminal: true, useColors: false } | ||
| 33 | 33 | }, | |
| 34 | 34 | { | |
| 35 | 35 | env: { TERM: 'dumb', FORCE_COLOR: '1' }, | |
@@ -41,15 +41,15 @@ const tests = [ | |||
| 41 | 41 | }, | |
| 42 | 42 | { | |
| 43 | 43 | env: { NODE_NO_READLINE: '0' }, | |
| 44 | - expected: { terminal: true, useColors: true } | ||
| 44 | + expected: { terminal: true, useColors: false } | ||
| 45 | 45 | }, | |
| 46 | 46 | { | |
| 47 | 47 | env: { NODE_REPL_MODE: 'sloppy' }, | |
| 48 | - expected: { terminal: true, useColors: true, replMode: REPL_MODE_SLOPPY } | ||
| 48 | + expected: { terminal: true, useColors: false, replMode: REPL_MODE_SLOPPY } | ||
| 49 | 49 | }, | |
| 50 | 50 | { | |
| 51 | 51 | env: { NODE_REPL_MODE: 'strict' }, | |
| 52 | - expected: { terminal: true, useColors: true, replMode: REPL_MODE_STRICT } | ||
| 52 | + expected: { terminal: true, useColors: false, replMode: REPL_MODE_STRICT } | ||
| 53 | 53 | }, | |
| 54 | 54 | ]; | |
| 55 | 55 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,7 +55,7 @@ assert.strictEqual(r1.output, stream); | |||
| 55 | 55 | assert.strictEqual(r1.input, r1.inputStream); | |
| 56 | 56 | assert.strictEqual(r1.output, r1.outputStream); | |
| 57 | 57 | assert.strictEqual(r1.terminal, true); | |
| 58 | - assert.strictEqual(r1.useColors, r1.terminal); | ||
| 58 | + assert.strictEqual(r1.useColors, false); | ||
| 59 | 59 | assert.strictEqual(r1.useGlobal, false); | |
| 60 | 60 | assert.strictEqual(r1.ignoreUndefined, false); | |
| 61 | 61 | assert.strictEqual(r1.replMode, repl.REPL_MODE_SLOPPY); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments