diff --git a/crates/biome_js_formatter/tests/specs/js/module/expression/call_arguments.js b/crates/biome_js_formatter/tests/specs/js/module/expression/call_arguments.js new file mode 100644 index 000000000000..8ca21bdd45df --- /dev/null +++ b/crates/biome_js_formatter/tests/specs/js/module/expression/call_arguments.js @@ -0,0 +1,3 @@ +useImperativeHandle(ref, () => { + return; +}, []); diff --git a/crates/biome_js_formatter/tests/specs/js/module/expression/call_arguments.js.snap b/crates/biome_js_formatter/tests/specs/js/module/expression/call_arguments.js.snap new file mode 100644 index 000000000000..25d247c78392 --- /dev/null +++ b/crates/biome_js_formatter/tests/specs/js/module/expression/call_arguments.js.snap @@ -0,0 +1,41 @@ +--- +source: crates/biome_formatter_test/src/snapshot_builder.rs +info: js/module/expression/call_arguments.js +--- +# Input + +```js +useImperativeHandle(ref, () => { + return; +}, []); + +``` + + +============================= + +# 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 commas: All +Semicolons: Always +Arrow parentheses: Always +Bracket spacing: true +Bracket same line: false +Attribute Position: Auto +----- + +```js +useImperativeHandle(ref, () => { + return; +}, []); +``` diff --git a/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js b/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js index 0e4b2c7b36a1..485d81744eea 100644 --- a/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js +++ b/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js @@ -39,7 +39,3 @@ expect( bar; } ).toThrow(ReferenceError); - -useImperativeHandle(ref, () => { - return; -}, []); diff --git a/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js.prettier-snap b/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js.prettier-snap index 9611163337a2..96b5fd363ed1 100644 --- a/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js.prettier-snap +++ b/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js.prettier-snap @@ -31,7 +31,3 @@ expect( bar; }, ).toThrow(ReferenceError); - -useImperativeHandle(ref, () => { - return; -}, []); diff --git a/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js.snap b/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js.snap index 4c4e4b4f3429..a7c4519bd555 100644 --- a/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js.snap +++ b/crates/biome_js_formatter/tests/specs/prettier/js/do/call-arguments.js.snap @@ -47,10 +47,6 @@ expect( } ).toThrow(ReferenceError); -useImperativeHandle(ref, () => { - return; -}, []); - ``` @@ -108,7 +104,7 @@ useImperativeHandle(ref, () => { var bar = "foo"; bar; }; -@@ -28,9 +40,9 @@ +@@ -28,6 +40,6 @@ () => { var bar = "foo"; }; @@ -118,9 +114,6 @@ useImperativeHandle(ref, () => { +bar; +} +).toThrow(ReferenceError) - - useImperativeHandle(ref, () => { - return; ``` # Output @@ -171,10 +164,6 @@ expect( bar; } ).toThrow(ReferenceError) - -useImperativeHandle(ref, () => { - return; -}, []); ``` # Errors @@ -405,7 +394,6 @@ call-arguments.js:40:3 parse ━━━━━━━━━━━━━━━━━ > 41 │ ).toThrow(ReferenceError); │ ^^^^^^^^^^^^^^^^^^^^^^^^^ 42 │ - 43 │ useImperativeHandle(ref, () => { i Expected a statement here. @@ -416,7 +404,6 @@ call-arguments.js:40:3 parse ━━━━━━━━━━━━━━━━━ > 41 │ ).toThrow(ReferenceError); │ ^^^^^^^^^^^^^^^^^^^^^^^^^ 42 │ - 43 │ useImperativeHandle(ref, () => { ```