MCPcopy Index your code
hub / github.com/postcss/postcss / isExpected

Function isExpected

test/fuzzing/fuzz_parse.js:113–121  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

111}
112
113function isExpected(error) {
114 if (error instanceof postcss.CssSyntaxError) return true
115 if (!error || typeof error.message !== 'string') return false
116 // Some legitimate inputs reach known-shaped TypeErrors during stringify or
117 // walk because the CSS allows constructs whose textual form is ambiguous.
118 // Suppress only those well-defined cases so real bugs still surface.
119 let benign = ['Unknown node type', 'Unknown word']
120 return benign.some(msg => error.message.indexOf(msg) !== -1)
121}

Callers 1

fuzz_parse.jsFile · 0.85

Calls 1

someMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…