--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/test-declarations/angularjs_inject.js --- # Input ```js beforeEach(inject(($fooService, $barService) => { // code })); afterAll(inject(($fooService, $barService) => { console.log('Hello'); })); it('should create the app', inject(($fooService, $barService) => { //code })); it("does something really long and complicated so I have to write a very long name for the test", inject(() => { // code })); it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => { // code })); /* * isTestCall(parent) should only be called when parent exists * and parent.type is CallExpression. This test makes sure that * no errors are thrown when calling isTestCall(parent) */ function x() { inject(() => {}) } ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -14,10 +14,7 @@ // code })); -it("does something really long and complicated so I have to write a very long name for the test", inject(( - $fooServiceLongName, - $barServiceLongName, -) => { +it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => { // code })); ``` # Output ```js beforeEach(inject(($fooService, $barService) => { // code })); afterAll(inject(($fooService, $barService) => { console.log("Hello"); })); it("should create the app", inject(($fooService, $barService) => { //code })); it("does something really long and complicated so I have to write a very long name for the test", inject(() => { // code })); it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => { // code })); /* * isTestCall(parent) should only be called when parent exists * and parent.type is CallExpression. This test makes sure that * no errors are thrown when calling isTestCall(parent) */ function x() { inject(() => {}); } ``` # Lines exceeding max width of 80 characters ``` 13: it("does something really long and complicated so I have to write a very long name for the test", inject(() => { 17: it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => { ```