---
source: crates/biome_formatter_test/src/snapshot_builder.rs
info: js/module/call_expression.js
---
# Input
```js
useEffect(() => {
}, [a, b])
useMemo(() => {
return {
d, e
}
}, [a, b])
useMemo(() => {
} // some comment
,
[a, b]
)
useEffect(() => {
if (clipboardStatus !== "normal") {
setClipboardStatus("normal");
}
}, [formatter_ir]);
test.expect(t => {
t.true(a)
})
test.expect(t => {
t.true(a)
}, false)
test.something(t => {
t.true()
}, context => {
context.flush()
})
// trailing separator omitted
test.expect(t => {
t.true(a)
}, false,)
test.expect(t => {
t.true(a)
}, false,
// comment
)
// should group start of function expression onto the same line
const Button1 = forwardRef(function Button(props, ref) {
return ;
}
);
const Button2 = forwardRef(function (props, ref) { return ; }
);
// should break whole call before breaking parameter list
const FilterButton = forwardRefWithLongFunctionName(function FilterButton(props, ref) {
return ;
}
);
// Object destructuring should break at exactly the line width. If a conditional
// trailing comma is rendered, this breaks one character too early.
aLongFunctionName(({ parameter1, parameter2, parameter3, parameter4, and }) => {
const a = 1;
}
);
```
=============================
# Outputs
## Output 1
-----
Indent style: Tab
Indent width: 2
Line ending: LF
Line width: 80
Quote style: Double Quotes
JSX quote style: Double Quotes
Quote properties: As needed
Trailing comma: All
Semicolons: Always
Arrow parentheses: Always
Bracket spacing: true
Bracket same line: false
Attribute Position: Auto
-----
```js
useEffect(() => {}, [a, b]);
useMemo(() => {
return {
d,
e,
};
}, [a, b]);
useMemo(
() => {}, // some comment
[a, b],
);
useEffect(() => {
if (clipboardStatus !== "normal") {
setClipboardStatus("normal");
}
}, [formatter_ir]);
test.expect((t) => {
t.true(a);
});
test.expect((t) => {
t.true(a);
}, false);
test.something(
(t) => {
t.true();
},
(context) => {
context.flush();
},
);
// trailing separator omitted
test.expect((t) => {
t.true(a);
}, false);
test.expect(
(t) => {
t.true(a);
},
false,
// comment
);
// should group start of function expression onto the same line
const Button1 = forwardRef(function Button(props, ref) {
return ;
});
const Button2 = forwardRef(function (props, ref) {
return ;
});
// should break whole call before breaking parameter list
const FilterButton = forwardRefWithLongFunctionName(
function FilterButton(props, ref) {
return ;
},
);
// Object destructuring should break at exactly the line width. If a conditional
// trailing comma is rendered, this breaks one character too early.
aLongFunctionName(({ parameter1, parameter2, parameter3, parameter4, and }) => {
const a = 1;
});
```