/* Emscripten's debug libc reports unimplemented syscalls on stderr, which the * worker surfaces as a console error. __syscall_mprotect is such a stub: it * prints only in non-NDEBUG builds and returns success ("let's not and say we * did", system/lib/libc/emscripten_syscall_stubs.c). Keep the raw text in the * receipt (consoleErrors) and exclude only this exact shape from assertions. */ export const RUNTIME_STUB_NOISE = /^warning: unsupported syscall: __syscall_[a-z0-9_]+$/; export const runtimeNoise = (errors: string[]): string[] => errors.filter(text => RUNTIME_STUB_NOISE.test(text.trim())); export const productErrors = (errors: string[]): string[] => errors.filter(text => !RUNTIME_STUB_NOISE.test(text.trim()));