// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`arrow.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
export default function searchUsers(action$) {
  return action$.ofType(ActionTypes.SEARCHED_USERS)
    .map(action => action.payload.query)
    .filter(q => !!q)
    .switchMap(q =>
      Observable.timer(800) // debounce
        .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS))
        .mergeMap(() => Observable.merge(
          Observable.of(replace(\`?q=\${q}\`)),
          ajax.getJSON(\`https://api.github.com/search/users?q=\${q}\`)
            .map(res => res.items)
            .map(receiveUsers)
        ))
    );
};

=====================================output=====================================
export default function searchUsers(action$) {
  return action$
    .ofType(ActionTypes.SEARCHED_USERS)
    .map(action => action.payload.query)
    .filter(q => !!q)
    .switchMap(q =>
      Observable.timer(800) // debounce
        .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS))
        .mergeMap(() =>
          Observable.merge(
            Observable.of(replace(\`?q=\${q}\`)),
            ajax
              .getJSON(\`https://api.github.com/search/users?q=\${q}\`)
              .map(res => res.items)
              .map(receiveUsers)
          )
        )
    );
}

================================================================================
`;

exports[`break.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
export default class AddAssetHtmlPlugin {
  apply(compiler: WebpackCompilerType) {
    compiler.plugin('compilation', (compilation: WebpackCompilationType) => {
      compilation.plugin('html-webpack-plugin-before-html', (callback: Callback<any>) => {
        addAllAssetsToCompilation(this.assets, compilation, htmlPluginData, callback);
      });
    });
  }
}

=====================================output=====================================
export default class AddAssetHtmlPlugin {
  apply(compiler: WebpackCompilerType) {
    compiler.plugin("compilation", (compilation: WebpackCompilationType) => {
      compilation.plugin(
        "html-webpack-plugin-before-html",
        (callback: Callback<any>) => {
          addAllAssetsToCompilation(
            this.assets,
            compilation,
            htmlPluginData,
            callback
          );
        }
      );
    });
  }
}

================================================================================
`;

exports[`break-parent.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
({
  processors: [
    require("autoprefixer", {
      browsers: ["> 1%", "last 2 versions", "ie >= 11", "Firefox ESR"]
    }),
    require("postcss-url")({
      url: url =>
        url.startsWith("/") || /^[a-z]+:/.test(url) ? url : \`/static/\${url}\`
    })
  ]
});

true
  ? test({
      a: 1
    })
  : <div
      a={123412342314}
      b={123412341234}
      c={123412341234}
      d={123412341234}
      e={123412341234}
      f={123412341234}
      g={123412341234}
    />;

=====================================output=====================================
({
  processors: [
    require("autoprefixer", {
      browsers: ["> 1%", "last 2 versions", "ie >= 11", "Firefox ESR"]
    }),
    require("postcss-url")({
      url: url =>
        url.startsWith("/") || /^[a-z]+:/.test(url) ? url : \`/static/\${url}\`
    })
  ]
});

true ? (
  test({
    a: 1
  })
) : (
  <div
    a={123412342314}
    b={123412341234}
    c={123412341234}
    d={123412341234}
    e={123412341234}
    f={123412341234}
    g={123412341234}
  />
);

================================================================================
`;

exports[`edge_case.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
var listener = DOM.listen(
  introCard,
  'click',
  sigil,
  (event: JavelinEvent): void =>
    BanzaiLogger.log(
      config,
      {...logData, ...DataStore.get(event.getNode(sigil))},
    ),
);

a(
  SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong,
  [
    {
      SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong: 1
    }
  ]
);

exports.examples = [
  {
    render: withGraphQLQuery(
      'node(1234567890){image{uri}}',
      function(container, data) {
        return (
          <div>
            <InlineBlock>
              <img
                src={data[1234567890].image.uri}
                style={{position: 'absolute', top: '0', left: '0', zIndex:'-1'}}
              />
            </InlineBlock>
          </div>
        );
      }
    )
  }
];

someReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReally.a([
  [],
  // comment
  [],
]);

(function webpackUniversalModuleDefinition() {})(this, function(__WEBPACK_EXTERNAL_MODULE_85__, __WEBPACK_EXTERNAL_MODULE_115__) {
return /******/ (function(modules) { // webpackBootstrap

/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {

/***/ }
/******/ ])
});

=====================================output=====================================
var listener = DOM.listen(
  introCard,
  "click",
  sigil,
  (event: JavelinEvent): void =>
    BanzaiLogger.log(config, {
      ...logData,
      ...DataStore.get(event.getNode(sigil))
    })
);

a(
  SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong,
  [
    {
      SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong: 1
    }
  ]
);

exports.examples = [
  {
    render: withGraphQLQuery("node(1234567890){image{uri}}", function(
      container,
      data
    ) {
      return (
        <div>
          <InlineBlock>
            <img
              src={data[1234567890].image.uri}
              style={{
                position: "absolute",
                top: "0",
                left: "0",
                zIndex: "-1"
              }}
            />
          </InlineBlock>
        </div>
      );
    })
  }
];

someReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReally.a(
  [
    [],
    // comment
    []
  ]
);

(function webpackUniversalModuleDefinition() {})(this, function(
  __WEBPACK_EXTERNAL_MODULE_85__,
  __WEBPACK_EXTERNAL_MODULE_115__
) {
  return /******/ (function(modules) {
    // webpackBootstrap
    /******/
  })(
    /************************************************************************/
    /******/ [
      /* 0 */
      /***/ function(module, exports, __webpack_require__) {
        /***/
      },
      /* 1 */
      /***/ function(module, exports, __webpack_require__) {
        /***/
      },
      /* 2 */
      /***/ function(module, exports, __webpack_require__) {
        /***/
      }
      /******/
    ]
  );
});

================================================================================
`;

exports[`empty-object.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
func(first, second, third, fourth, fifth, aReallyLongArgumentsListToForceItToBreak, {
  // comment
})

func({
  // comment
})

func(
  {} // comment
)

func(
  {}
  // comment
)

func(
  // comment
  {}
)

=====================================output=====================================
func(
  first,
  second,
  third,
  fourth,
  fifth,
  aReallyLongArgumentsListToForceItToBreak,
  {
    // comment
  }
);

func({
  // comment
});

func(
  {} // comment
);

func(
  {}
  // comment
);

func(
  // comment
  {}
);

================================================================================
`;

exports[`jsx.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
const els = items.map(item => (
  <div className="whatever">
    <span>{children}</span>
  </div>
));

=====================================output=====================================
const els = items.map(item => (
  <div className="whatever">
    <span>{children}</span>
  </div>
));

================================================================================
`;

exports[`object.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
const formatData = pipe(
  zip,
  map(([ ref, data ]) => ({
    nodeId: ref.nodeId.toString(),
    ...attributeFromDataValue(ref.attributeId, data)
  })),
  groupBy(prop('nodeId')),
  map(mergeAll),
  values
);

export const setProp = y => ({
  ...y,
  a: 'very, very, very long very, very long text'
});

export const log = y => {
  console.log('very, very, very long very, very long text')
};

=====================================output=====================================
const formatData = pipe(
  zip,
  map(([ref, data]) => ({
    nodeId: ref.nodeId.toString(),
    ...attributeFromDataValue(ref.attributeId, data)
  })),
  groupBy(prop("nodeId")),
  map(mergeAll),
  values
);

export const setProp = y => ({
  ...y,
  a: "very, very, very long very, very long text"
});

export const log = y => {
  console.log("very, very, very long very, very long text");
};

================================================================================
`;

exports[`overflow.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall((err, result) => {
  // comment
});

func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, []);
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, []);
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, [
  // Comments
]);
func(five, six, seven, eig, is, this, too, long, yes, [
  // Comments
]);

func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, {});
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, {});
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, {
  // Comments
});

foo(
  (
    one,
    two,
    three,
    four,
    five,
    six,
    seven,
    eight,
    nine,
    ten,
    eleven,
    twelve,
    thirteen,
    fourteen,
  ) => {},
);

const contentTypes = function(tile, singleSelection) {
  return compute(
    function contentTypesContentTypes(
      tile,
      searchString = '',
      filteredContentTypes = [],
      contentTypesArray = [],
      selectedGroup,
      singleSelection) {
      selectedGroup = (tile.state && tile.state.group) || selectedGroup;
    }
  );
};

=====================================output=====================================
SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall(
  (err, result) => {
    // comment
  }
);

func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, []);
func(
  one,
  two,
  three,
  four,
  five,
  six,
  seven,
  eig,
  is,
  this,
  too,
  long,
  yes,
  []
);
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, [
  // Comments
]);
func(five, six, seven, eig, is, this, too, long, yes, [
  // Comments
]);

func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, {});
func(
  one,
  two,
  three,
  four,
  five,
  six,
  seven,
  eig,
  is,
  this,
  too,
  long,
  yes,
  {}
);
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, {
  // Comments
});

foo(
  (
    one,
    two,
    three,
    four,
    five,
    six,
    seven,
    eight,
    nine,
    ten,
    eleven,
    twelve,
    thirteen,
    fourteen
  ) => {}
);

const contentTypes = function(tile, singleSelection) {
  return compute(function contentTypesContentTypes(
    tile,
    searchString = "",
    filteredContentTypes = [],
    contentTypesArray = [],
    selectedGroup,
    singleSelection
  ) {
    selectedGroup = (tile.state && tile.state.group) || selectedGroup;
  });
};

================================================================================
`;
