(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestArrayCircularReferenceToLocaleString(t *testing.T) { |
| 55 | const SCRIPT = ` |
| 56 | var T = [1, 2, 3]; |
| 57 | T[42] = T; // Create circular reference |
| 58 | var str = T.toLocaleString(); |
| 59 | // Circular reference should be replaced with empty string |
| 60 | str === "1,2,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"; |
| 61 | ` |
| 62 | testScript(SCRIPT, valueTrue, t) |
| 63 | } |
| 64 | |
| 65 | func TestArrayMultipleCircularReferences(t *testing.T) { |
| 66 | const SCRIPT = ` |
nothing calls this directly
no test coverage detected
searching dependent graphs…