Fix more unit tests
This commit is contained in:
		| @ -687,7 +687,7 @@ describe('Testing removeSingleConstraintInfo', () => { | ||||
|   |> angledLineThatIntersects( | ||||
|         angle = 3.14 + 0, | ||||
|         intersectTag = a, | ||||
|         offset = 0 + 0 | ||||
|         offset = 0 + 0, | ||||
|       ) | ||||
|   |> tangentialArc(endAbsolute = [3.14 + 0, 13.14 + 0])` | ||||
|     test.each([ | ||||
| @ -728,12 +728,12 @@ describe('Testing removeSingleConstraintInfo', () => { | ||||
|         '', | ||||
|       ], | ||||
|       [ | ||||
|         `angledLineThatIntersects({ | ||||
|         `angledLineThatIntersects( | ||||
|        angle = 3.14 + 0, | ||||
|        intersectTag = a, | ||||
|        offset = 0, | ||||
|        intersectTag = a | ||||
|      }, %)`, | ||||
|         'objectProperty', | ||||
|      )`, | ||||
|         'labeledArg', | ||||
|         'offset', | ||||
|         '', | ||||
|       ], | ||||
| @ -762,11 +762,6 @@ describe('Testing removeSingleConstraintInfo', () => { | ||||
|             type: 'arrayItem', | ||||
|             index: value === 0 ? 0 : 1, | ||||
|           } | ||||
|         } else if (key === 'objectProperty' && typeof value === 'string') { | ||||
|           argPosition = { | ||||
|             type: 'objectProperty', | ||||
|             key: value, | ||||
|           } | ||||
|         } else if (key === '') { | ||||
|           argPosition = { | ||||
|             type: 'singleValue', | ||||
|  | ||||
| @ -337,11 +337,7 @@ describe('it recasts wrapped object expressions in pipe bodies with correct inde | ||||
|   |> startProfileAt([-0.01, -0.08], %) | ||||
|   |> line(end = [0.62, 4.15], tag = $seg01) | ||||
|   |> line(end = [2.77, -1.24]) | ||||
|   |> angledLineThatIntersects({ | ||||
|        angle = 201, | ||||
|        offset = -1.35, | ||||
|        intersectTag = $seg01 | ||||
|      }, %) | ||||
|   |> angledLineThatIntersects(angle = 201, offset = -1.35, intersectTag = $seg01) | ||||
|   |> line(end = [-0.42, -1.72]) | ||||
| ` | ||||
|     const { ast } = code2ast(code) | ||||
| @ -350,11 +346,7 @@ describe('it recasts wrapped object expressions in pipe bodies with correct inde | ||||
|     expect(recasted).toBe(code) | ||||
|   }) | ||||
|   it('recasts wrapped object expressions NOT in pipe body correctly', () => { | ||||
|     const code = `angledLineThatIntersects({ | ||||
|   angle = 201, | ||||
|   offset = -1.35, | ||||
|   intersectTag = $seg01 | ||||
| }, %) | ||||
|     const code = `angledLineThatIntersects(angle = 201, offset = -1.35, intersectTag = $seg01) | ||||
| ` | ||||
|     const { ast } = code2ast(code) | ||||
|     const recasted = recast(ast) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user