yarn fmt
This commit is contained in:
committed by
Nick Cameron
parent
18b1d84e5c
commit
cd28a4a9a1
@ -503,7 +503,11 @@ ${!replace1 ? ` |> ${line}\n` : ''} |> angledLine([-65, ${
|
|||||||
`
|
`
|
||||||
test.each([
|
test.each([
|
||||||
['line', 'line(end = [306.21, 198.85], tag = $a)', ['365.11', '33']],
|
['line', 'line(end = [306.21, 198.85], tag = $a)', ['365.11', '33']],
|
||||||
['lineTo', 'line(endAbsolute = [306.21, 198.85], tag = $a)', ['110.48', '119.73']],
|
[
|
||||||
|
'lineTo',
|
||||||
|
'line(endAbsolute = [306.21, 198.85], tag = $a)',
|
||||||
|
['110.48', '119.73'],
|
||||||
|
],
|
||||||
['yLine', 'yLine(198.85, %, $a)', ['198.85', '90']],
|
['yLine', 'yLine(198.85, %, $a)', ['198.85', '90']],
|
||||||
['xLine', 'xLine(198.85, %, $a)', ['198.85', '0']],
|
['xLine', 'xLine(198.85, %, $a)', ['198.85', '0']],
|
||||||
['yLineTo', 'yLineTo(198.85, %, $a)', ['95.94', '90']],
|
['yLineTo', 'yLineTo(198.85, %, $a)', ['95.94', '90']],
|
||||||
|
|||||||
@ -1018,10 +1018,7 @@ export function giveSketchFnCallTag(
|
|||||||
const { node: primaryCallExp } = kwCallNode
|
const { node: primaryCallExp } = kwCallNode
|
||||||
const existingTag = findKwArg(ARG_TAG, primaryCallExp)
|
const existingTag = findKwArg(ARG_TAG, primaryCallExp)
|
||||||
const tagDeclarator =
|
const tagDeclarator =
|
||||||
existingTag ||
|
existingTag || createTagDeclarator(tag || findUniqueName(ast, 'seg', 2))
|
||||||
(createTagDeclarator(
|
|
||||||
tag || findUniqueName(ast, 'seg', 2)
|
|
||||||
))
|
|
||||||
const isTagExisting = !!existingTag
|
const isTagExisting = !!existingTag
|
||||||
kwCallNode.node.arguments.push(createLabeledArg(ARG_TAG, tagDeclarator))
|
kwCallNode.node.arguments.push(createLabeledArg(ARG_TAG, tagDeclarator))
|
||||||
return { tagDeclarator, isTagExisting }
|
return { tagDeclarator, isTagExisting }
|
||||||
|
|||||||
@ -240,7 +240,9 @@ describe('testing addTagForSketchOnFace', () => {
|
|||||||
if (err(sketchOnFaceRetVal)) return sketchOnFaceRetVal
|
if (err(sketchOnFaceRetVal)) return sketchOnFaceRetVal
|
||||||
|
|
||||||
const { modifiedAst } = sketchOnFaceRetVal
|
const { modifiedAst } = sketchOnFaceRetVal
|
||||||
const expectedCode = genCode('line(endAbsolute = [-1.59, -1.54], tag = $seg01)')
|
const expectedCode = genCode(
|
||||||
|
'line(endAbsolute = [-1.59, -1.54], tag = $seg01)'
|
||||||
|
)
|
||||||
expect(recast(modifiedAst)).toBe(expectedCode)
|
expect(recast(modifiedAst)).toBe(expectedCode)
|
||||||
})
|
})
|
||||||
const chamferTestCases = [
|
const chamferTestCases = [
|
||||||
|
|||||||
Reference in New Issue
Block a user