fix(test): let Node-runtime test workers ignore faked parent messages (#35427)

This commit is contained in:
Neil
2026-10-28 15:54:06 -07:00
committed by GitHub
parent 0774fc9373
commit b378dd183a
@@ -24,6 +24,7 @@ export function encodeNodeRuntimeMessage(value) {
return stringify(value, reducers)
}
// Why pass non-strings through: tests that fake a parent with process.emit('message') reach this listener too.
export function decodeNodeRuntimeMessage(text) {
return parse(text, revivers)
return typeof text === 'string' ? parse(text, revivers) : text
}