@@ -104,17 +104,15 @@ test('parseError for template literals with expressions', () => {
104
104
)
105
105
} )
106
106
107
- /* Skip the test for now
108
107
test ( '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`
111
110
)
112
111
} , 30000 )
113
- */
114
112
115
113
test ( '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`
118
116
)
119
117
} , 30000 )
120
118
@@ -177,9 +175,7 @@ test('Arrow function infinite recursion with list args represents CallExpression
177
175
f(list(1, 2));
178
176
` ,
179
177
{ 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` )
183
179
} , 30000 )
184
180
185
181
test ( 'Function infinite recursion with list args represents CallExpression well' , ( ) => {
@@ -195,18 +191,14 @@ test('Arrow function infinite recursion with different args represents CallExpre
195
191
return expectParsedError ( stripIndent `
196
192
const f = i => f(i+1) - 1;
197
193
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` )
201
195
} , 30000 )
202
196
203
197
test ( 'Function infinite recursion with different args represents CallExpression well' , ( ) => {
204
198
return expectParsedError ( stripIndent `
205
199
function f(i) { return f(i+1) - 1; }
206
200
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` )
210
202
} , 30000 )
211
203
212
204
test ( 'Functions passed into non-source functions remain equal' , ( ) => {
0 commit comments