--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/module/arrow/call.js --- # Input ```js const testResults = results.testResults.map(testResult => formatResult(testResult, formatter, reporter) ); it('mocks regexp instances', () => { expect( // () => moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), ).not.toThrow(); }); expect(() => asyncRequest({ url: "/test-endpoint" })) // .toThrowError(/Required parameter/); expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-long-url" })) // .toThrowError(/Required parameter/); expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" })) // .toThrowError(/Required parameter/); expect(() => asyncRequest({ type: "foo", url: "/test-endpoint" })) .not.toThrowError(); expect(() => asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" })) .not.toThrowError(); const a = Observable .fromPromise(axiosInstance.post('/carts/mine')) .map((response) => response.data) const b = Observable.fromPromise(axiosInstance.get(url)) .map((response) => response.data) func( veryLoooooooooooooooooooooooongName, veryLooooooooooooooooooooooooongName => veryLoooooooooooooooongName.something() ); const composition = (ViewComponent, ContainerComponent) => class extends React.Component { static propTypes = {}; }; romise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail"); ``` ============================= # Outputs ## Output 1 ----- Indent style: Tab Line width: 80 Quote style: Double Quotes Quote properties: As needed Trailing comma: All Semicolons: Always ----- ```js const testResults = results.testResults.map((testResult) => formatResult(testResult, formatter, reporter), ); it("mocks regexp instances", () => { expect( // () => moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), ).not.toThrow(); }); expect(() => asyncRequest({ url: "/test-endpoint" })); // .toThrowError(/Required parameter/); expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-long-url" })); // .toThrowError(/Required parameter/); expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" }), ); // .toThrowError(/Required parameter/); expect(() => asyncRequest({ type: "foo", url: "/test-endpoint" }), ).not.toThrowError(); expect(() => asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" }), ).not.toThrowError(); const a = Observable.fromPromise(axiosInstance.post("/carts/mine")).map( (response) => response.data, ); const b = Observable.fromPromise(axiosInstance.get(url)).map( (response) => response.data, ); func( veryLoooooooooooooooooooooooongName, (veryLooooooooooooooooooooooooongName) => veryLoooooooooooooooongName.something(), ); const composition = (ViewComponent, ContainerComponent) => class extends React.Component { static propTypes = {}; }; romise.then((result) => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail", ); ```