You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add tests for --no-default and --no-default --json
Squashed from several commits while figuring out what was going on:
Remove unnecessary replacements
Back in 7835a7d there was no `FILTER`
at the top but now that there is, these settings are not in the output.
Remove confusing cleanupJsonOutput method
This does not support ndjson so in all tests (prior to this PR)
it was failing to parse the JSON and not actually executing
most of the method body.
Now that one of the new tests returns only a single line of JSON
this 'resurrected' this dead broken method causing tests to fail.
Instead use the same cleanup method for all cases, which is what
has been happening anyway (due to the fallback in the `catch`)
Add the remaining to snapshots now the tests are fixed
{"key":"lastUpdateCheck","effective":"1555784893958","source":"WORKSPACE_ROOT/.yarnrc.yml","description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}
63
+
",
64
+
}
65
+
`;
66
+
36
67
exports[`Commands config test (folder with rcfile and rc in ancestor parent / as json) 1`] = `
37
68
{
38
69
"code": 0,
@@ -44,6 +75,23 @@ exports[`Commands config test (folder with rcfile and rc in ancestor parent / as
44
75
}
45
76
`;
46
77
78
+
exports[`Commands config test (folder with rcfile and rc in ancestor parent / no defaults) 1`] = `
{"key":"lastUpdateCheck","effective":"1555784893958","source":"WORKSPACE_ROOT/.yarnrc.yml","description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}
123
+
",
124
+
}
125
+
`;
126
+
69
127
exports[`Commands config test (folder with rcfile and rc in home folder / as json) 1`] = `
70
128
{
71
129
"code": 0,
@@ -77,6 +135,23 @@ exports[`Commands config test (folder with rcfile and rc in home folder / as jso
77
135
}
78
136
`;
79
137
138
+
exports[`Commands config test (folder with rcfile and rc in home folder / no defaults) 1`] = `
{"key":"lastUpdateCheck","effective":"1555784893958","source":"WORKSPACE_ROOT/subfolder/.yarnrc.yml","description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}
183
+
",
184
+
}
185
+
`;
186
+
102
187
exports[`Commands config test (folder with rcfile and rc in parent / as json) 1`] = `
103
188
{
104
189
"code": 0,
@@ -110,6 +195,23 @@ exports[`Commands config test (folder with rcfile and rc in parent / as json) 1`
110
195
}
111
196
`;
112
197
198
+
exports[`Commands config test (folder with rcfile and rc in parent / no defaults) 1`] = `
0 commit comments