@@ -104,17 +104,15 @@ test('parseError for template literals with expressions', () => {
104104 )
105105} )
106106
107- /* Skip the test for now
108107test ( 'Simple arrow function infinite recursion represents CallExpression well' , ( ) => {
109- return expectParsedError('(x => x(x)(x))(x => x(x)(x));').toMatchInlineSnapshot (
110- `"Line 1: RangeError: Maximum call stack size exceeded" `
108+ return expectParsedError ( '(x => x(x)(x))(x => x(x)(x));' ) . toContain (
109+ `RangeError: Maximum call stack size exceeded`
111110 )
112111} , 30000 )
113- */
114112
115113test ( 'Simple function infinite recursion represents CallExpression well' , ( ) => {
116- return expectParsedError ( 'function f(x) {return x(x)(x);} f(f);' ) . toMatchInlineSnapshot (
117- `" RangeError: Maximum call stack size exceeded" `
114+ return expectParsedError ( 'function f(x) {return x(x)(x);} f(f);' ) . toContain (
115+ `RangeError: Maximum call stack size exceeded`
118116 )
119117} , 30000 )
120118
@@ -177,9 +175,7 @@ test('Arrow function infinite recursion with list args represents CallExpression
177175 f(list(1, 2));
178176 ` ,
179177 { chapter : Chapter . SOURCE_2 }
180- ) . toMatchInlineSnapshot (
181- `"Line 2: The function (anonymous) has encountered an infinite loop. It has no base case."`
182- )
178+ ) . toContain ( `RangeError: Maximum call stack size exceeded` )
183179} , 30000 )
184180
185181test ( 'Function infinite recursion with list args represents CallExpression well' , ( ) => {
@@ -195,18 +191,14 @@ test('Arrow function infinite recursion with different args represents CallExpre
195191 return expectParsedError ( stripIndent `
196192 const f = i => f(i+1) - 1;
197193 f(0);
198- ` ) . toMatchInlineSnapshot (
199- `"Line 2: The function (anonymous) has encountered an infinite loop. It has no base case."`
200- )
194+ ` ) . toContain ( `RangeError: Maximum call stack size exceeded` )
201195} , 30000 )
202196
203197test ( 'Function infinite recursion with different args represents CallExpression well' , ( ) => {
204198 return expectParsedError ( stripIndent `
205199 function f(i) { return f(i+1) - 1; }
206200 f(0);
207- ` ) . toMatchInlineSnapshot (
208- `"Line 2: The function f has encountered an infinite loop. It has no base case."`
209- )
201+ ` ) . toContain ( `RangeError: Maximum call stack size exceeded` )
210202} , 30000 )
211203
212204test ( 'Functions passed into non-source functions remain equal' , ( ) => {
0 commit comments