From 67ebb66d3ffa61582f8dd63ddbb5679649a5d2a4 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 8 May 2024 09:44:26 -0700 Subject: [PATCH] chore: disable color in config tests The logging output was making bare string assertions fail --- tap-snapshots/test/lib/commands/config.js.test.cjs | 8 ++++++-- test/lib/commands/config.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tap-snapshots/test/lib/commands/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index b86820a306029..ace89ec9a719d 100644 --- a/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -8,6 +8,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches snapshot 1`] = ` { "cache": "{CACHE}", + "color": {COLOR}, "json": true, "projectloaded": "yes", "userloaded": "yes", @@ -29,7 +30,6 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "call": "", "cert": null, "cidr": null, - "color": {COLOR}, "commit-hooks": true, "cpu": null, "depth": null, @@ -192,7 +192,7 @@ cafile = null call = "" cert = null cidr = null -color = {COLOR} +; color = {COLOR} commit-hooks = true cpu = null depth = null @@ -345,6 +345,7 @@ projectloaded = "yes" ; "cli" config from command line options cache = "{CACHE}" +color = {COLOR} long = true ` @@ -364,6 +365,7 @@ projectloaded = "yes" ; "cli" config from command line options cache = "{CACHE}" +color = {COLOR} ; node bin location = {NODE-BIN-LOCATION} ; node version = {NODE-VERSION} @@ -378,6 +380,7 @@ exports[`test/lib/commands/config.js TAP config list with publishConfig global > ; "cli" config from command line options cache = "{CACHE}" +color = {COLOR} global = true ; node bin location = {NODE-BIN-LOCATION} @@ -393,6 +396,7 @@ exports[`test/lib/commands/config.js TAP config list with publishConfig local > ; "cli" config from command line options cache = "{CACHE}" +color = {COLOR} ; node bin location = {NODE-BIN-LOCATION} ; node version = {NODE-VERSION} diff --git a/test/lib/commands/config.js b/test/lib/commands/config.js index 0806326e2e8e4..11ac9a7477eb1 100644 --- a/test/lib/commands/config.js +++ b/test/lib/commands/config.js @@ -37,7 +37,7 @@ const loadMockNpm = (t, opts = {}) => _loadMockNpm(t, { // Reset configs that mock npm sets by default 'fetch-retries': undefined, loglevel: undefined, - color: undefined, + color: false, }, })