(value)
| 43 | ); |
| 44 | |
| 45 | function formatValue(value) { |
| 46 | if (value === window) return "[sandbox window]"; |
| 47 | if (value === unsafeWindow) return "[unsafeWindow]"; |
| 48 | if (value === document) return "[document]"; |
| 49 | if (value && value.nodeType) return `[node ${value.nodeName}]`; |
| 50 | if (typeof value === "function") |
| 51 | return `[function ${value.name || "anonymous"}]`; |
| 52 | if (typeof value === "symbol") return value.toString(); |
| 53 | try { |
| 54 | return JSON.stringify(value); |
| 55 | } catch { |
| 56 | return String(value); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | function assertSame(expected, actual, message) { |
| 61 | if (!Object.is(expected, actual)) { |
no outgoing calls
no test coverage detected