--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/test-declarations/test_declarations.js --- # Input ```js // Shouldn't break it("does something really long and complicated so I have to write a very long name for the test", () => { console.log("hello!"); }); it("does something really long and complicated so I have to write a very long name for the test", function() { console.log("hello!"); }); it("does something really long and complicated so I have to write a very long name for the test", function(done) { console.log("hello!"); }); it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { console.log("hello!"); }); it(`does something really long and complicated so I have to write a very long name for the test`, function() { console.log("hello!"); }); it(`{foo + bar} does something really long and complicated so I have to write a very long name for the test`, function() { console.log("hello!"); }); it(`handles some newlines does something really long and complicated so I have to write a very long name for the test`, () => { console.log("hello!"); }) test("does something really long and complicated so I have to write a very long name for the test", (done) => { console.log("hello!"); }); test(`does something really long and complicated so I have to write a very long name for the test`, (done) => { console.log("hello!"); }); describe("does something really long and complicated so I have to write a very long name for the describe block", () => { it("an example test", (done) => { console.log("hello!"); }); }); describe(`does something really long and complicated so I have to write a very long name for the describe block`, () => { it(`an example test`, (done) => { console.log("hello!"); }); }); xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); describe.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); describe.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); it.only("does something really long and complicated so I have to write a very long name for the test", () => { console.log("hello!"); }); it.only(`does something really long and complicated so I have to write a very long name for the test`, () => { console.log("hello!"); }); it.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); skip("does something really long and complicated so I have to write a very long name for the test", () => {}); test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); test.step(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe.only("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.parallel(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe.parallel.only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); test.describe.parallel.only(`does something really long and complicated so I have to write a very long name for the testThis is a very`, () => {}); test.describe.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.serial(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe.serial.only("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.serial.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); // Should break it.only("does something really long and complicated so I have to write a very long name for the test", 10, () => { console.log("hello!"); }); it.only.only("does something really long and complicated so I have to write a very long name for the test", () => { console.log("hello!"); }); it.only.only("does something really long and complicated so I have to write a very long name for the test", (a, b, c) => { console.log("hello!"); }); xskip("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.only.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.parallel.serial("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); test.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.dummy.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); // timeout it(`handles some newlines does something really long and complicated so I have to write a very long name for the test`, () => { console.log("hello!"); }, 2500) it("does something quick", () => { console.log("hello!") }, 1000000000) it( 'succeeds if the test finishes in time', () => new Promise(resolve => setTimeout(resolve, 10)) ); it( 'succeeds if the test finishes in time', () => new Promise(resolve => setTimeout(resolve, 10)), 250 ); ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -93,35 +93,25 @@ test.describe(`does something really long and complicated so I have to write a very long name for the test`, () => {}); -test.describe - .only("does something really long and complicated so I have to write a very long name for the test", () => {}); +test.describe.only("does something really long and complicated so I have to write a very long name for the test", () => {}); -test.describe - .only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); +test.describe.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); -test.describe - .parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); +test.describe.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); -test.describe - .parallel(`does something really long and complicated so I have to write a very long name for the test`, () => {}); +test.describe.parallel(`does something really long and complicated so I have to write a very long name for the test`, () => {}); -test.describe.parallel - .only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); +test.describe.parallel.only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); -test.describe.parallel - .only(`does something really long and complicated so I have to write a very long name for the testThis is a very`, () => {}); +test.describe.parallel.only(`does something really long and complicated so I have to write a very long name for the testThis is a very`, () => {}); -test.describe - .serial("does something really long and complicated so I have to write a very long name for the test", () => {}); +test.describe.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); -test.describe - .serial(`does something really long and complicated so I have to write a very long name for the test`, () => {}); +test.describe.serial(`does something really long and complicated so I have to write a very long name for the test`, () => {}); -test.describe.serial - .only("does something really long and complicated so I have to write a very long name for the test", () => {}); +test.describe.serial.only("does something really long and complicated so I have to write a very long name for the test", () => {}); -test.describe.serial - .only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); +test.describe.serial.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); // Should break @@ -152,10 +142,7 @@ () => {}, ); -test.describe.only.parallel( - "does something really long and complicated so I have to write a very long name for the test", - () => {}, -); +test.describe.only.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.parallel.serial( "does something really long and complicated so I have to write a very long name for the testThis is a very", ``` # Output ```js // Shouldn't break it("does something really long and complicated so I have to write a very long name for the test", () => { console.log("hello!"); }); it("does something really long and complicated so I have to write a very long name for the test", function () { console.log("hello!"); }); it("does something really long and complicated so I have to write a very long name for the test", function (done) { console.log("hello!"); }); it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { console.log("hello!"); }); it(`does something really long and complicated so I have to write a very long name for the test`, function () { console.log("hello!"); }); it(`{foo + bar} does something really long and complicated so I have to write a very long name for the test`, function () { console.log("hello!"); }); it(`handles some newlines does something really long and complicated so I have to write a very long name for the test`, () => { console.log("hello!"); }); test("does something really long and complicated so I have to write a very long name for the test", (done) => { console.log("hello!"); }); test(`does something really long and complicated so I have to write a very long name for the test`, (done) => { console.log("hello!"); }); describe("does something really long and complicated so I have to write a very long name for the describe block", () => { it("an example test", (done) => { console.log("hello!"); }); }); describe(`does something really long and complicated so I have to write a very long name for the describe block`, () => { it(`an example test`, (done) => { console.log("hello!"); }); }); xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); describe.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); describe.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); it.only("does something really long and complicated so I have to write a very long name for the test", () => { console.log("hello!"); }); it.only(`does something really long and complicated so I have to write a very long name for the test`, () => { console.log("hello!"); }); it.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); skip("does something really long and complicated so I have to write a very long name for the test", () => {}); test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); test.step(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe.only("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.parallel(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe.parallel.only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); test.describe.parallel.only(`does something really long and complicated so I have to write a very long name for the testThis is a very`, () => {}); test.describe.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.serial(`does something really long and complicated so I have to write a very long name for the test`, () => {}); test.describe.serial.only("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.serial.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); // Should break it.only( "does something really long and complicated so I have to write a very long name for the test", 10, () => { console.log("hello!"); }, ); it.only.only( "does something really long and complicated so I have to write a very long name for the test", () => { console.log("hello!"); }, ); it.only.only( "does something really long and complicated so I have to write a very long name for the test", (a, b, c) => { console.log("hello!"); }, ); xskip( "does something really long and complicated so I have to write a very long name for the test", () => {}, ); test.describe.only.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); test.describe.parallel.serial( "does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}, ); test.serial( "does something really long and complicated so I have to write a very long name for the test", () => {}, ); test.describe.dummy.serial( "does something really long and complicated so I have to write a very long name for the test", () => {}, ); // timeout it(`handles some newlines does something really long and complicated so I have to write a very long name for the test`, () => { console.log("hello!"); }, 2500); it("does something quick", () => { console.log("hello!"); }, 1000000000); it("succeeds if the test finishes in time", () => new Promise((resolve) => setTimeout(resolve, 10))); it( "succeeds if the test finishes in time", () => new Promise((resolve) => setTimeout(resolve, 10)), 250, ); ``` # Lines exceeding max width of 80 characters ``` 3: it("does something really long and complicated so I have to write a very long name for the test", () => { 7: it("does something really long and complicated so I have to write a very long name for the test", function () { 11: it("does something really long and complicated so I have to write a very long name for the test", function (done) { 15: it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { 19: it(`does something really long and complicated so I have to write a very long name for the test`, function () { 23: it(`{foo + bar} does something really long and complicated so I have to write a very long name for the test`, function () { 30: does something really long and complicated so I have to write a very long name for the test`, () => { 34: test("does something really long and complicated so I have to write a very long name for the test", (done) => { 38: test(`does something really long and complicated so I have to write a very long name for the test`, (done) => { 42: describe("does something really long and complicated so I have to write a very long name for the describe block", () => { 48: describe(`does something really long and complicated so I have to write a very long name for the describe block`, () => { 54: xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); 56: fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); 58: describe.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 60: describe.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 62: fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); 64: xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); 66: it.only("does something really long and complicated so I have to write a very long name for the test", () => { 70: it.only(`does something really long and complicated so I have to write a very long name for the test`, () => { 74: it.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 76: test.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 78: test.skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 80: ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); 82: xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); 84: skip(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 86: skip("does something really long and complicated so I have to write a very long name for the test", () => {}); 88: test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); 90: test.step(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 92: test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); 94: test.describe(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 96: test.describe.only("does something really long and complicated so I have to write a very long name for the test", () => {}); 98: test.describe.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 100: test.describe.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); 102: test.describe.parallel(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 104: test.describe.parallel.only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); 106: test.describe.parallel.only(`does something really long and complicated so I have to write a very long name for the testThis is a very`, () => {}); 108: test.describe.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); 110: test.describe.serial(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 112: test.describe.serial.only("does something really long and complicated so I have to write a very long name for the test", () => {}); 114: test.describe.serial.only(`does something really long and complicated so I have to write a very long name for the test`, () => {}); 119: "does something really long and complicated so I have to write a very long name for the test", 127: "does something really long and complicated so I have to write a very long name for the test", 134: "does something really long and complicated so I have to write a very long name for the test", 141: "does something really long and complicated so I have to write a very long name for the test", 145: test.describe.only.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); 148: "does something really long and complicated so I have to write a very long name for the testThis is a very", 153: "does something really long and complicated so I have to write a very long name for the test", 158: "does something really long and complicated so I have to write a very long name for the test", 167: does something really long and complicated so I have to write a very long name for the test`, () => { ```