MCPcopy
hub / github.com/prettier/prettier / runCliWithLogLevel

Function runCliWithLogLevel

tests/integration/__tests__/log-level.js:112–133  ·  view source on GitHub ↗
(logLevel, patterns)

Source from the content-addressed store, hash-verified

110});
111
112async function runCliWithLogLevel(logLevel, patterns) {
113 const result = await runCli("cli/log-level", [
114 "--log-level",
115 logLevel,
116 "--unknown-option",
117 "--parser",
118 "unknown-parser",
119 "not-found.js",
120 ]);
121
122 expect(result.status).toBe(2);
123
124 const { stderr } = result;
125
126 if (patterns) {
127 for (const pattern of patterns) {
128 expect(stderr).toMatch(pattern);
129 }
130 } else {
131 expect(stderr).toMatch(/^\s*$/);
132 }
133}

Callers 1

log-level.jsFile · 0.85

Calls 1

runCliFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…