2017-10-16 01:13:25 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`pipeline_operator.js 1`] = `
|
|
|
|
====================================options=====================================
|
2018-12-27 16:05:19 +03:00
|
|
|
parsers: ["babel"]
|
2018-11-25 11:21:14 +03:00
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-10-16 01:13:25 +03:00
|
|
|
a |> b |> c;
|
|
|
|
|
|
|
|
a |> (b |> c);
|
|
|
|
|
|
|
|
(a |> b) || c;
|
|
|
|
a |> (b || c);
|
|
|
|
|
|
|
|
let result = "hello"
|
|
|
|
|> doubleSay
|
|
|
|
|> capitalize
|
|
|
|
|> exclaim;
|
|
|
|
|
|
|
|
let newScore = person.score
|
|
|
|
|> double
|
|
|
|
|> (_ => add(7, _))
|
|
|
|
|> (_ => subtract(2, _))
|
|
|
|
|> (_ => boundScore(0, 100, _));
|
|
|
|
|
|
|
|
function createPerson (attrs) {
|
|
|
|
attrs
|
|
|
|
|> bounded('age', 1, 100)
|
|
|
|
|> format('name', /^[a-z]$/i)
|
|
|
|
|> Person.insertIntoDatabase;
|
|
|
|
}
|
2018-05-24 23:06:33 +03:00
|
|
|
|
|
|
|
foo |> (bar ?? baz);
|
|
|
|
(foo |> bar) ?? baz;
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-10-16 01:13:25 +03:00
|
|
|
a |> b |> c;
|
|
|
|
|
|
|
|
a |> (b |> c);
|
|
|
|
|
|
|
|
(a |> b) || c;
|
|
|
|
a |> b || c;
|
|
|
|
|
|
|
|
let result = "hello" |> doubleSay |> capitalize |> exclaim;
|
|
|
|
|
|
|
|
let newScore =
|
|
|
|
person.score
|
|
|
|
|> double
|
|
|
|
|> (_ => add(7, _))
|
|
|
|
|> (_ => subtract(2, _))
|
|
|
|
|> (_ => boundScore(0, 100, _));
|
|
|
|
|
|
|
|
function createPerson(attrs) {
|
|
|
|
attrs
|
|
|
|
|> bounded("age", 1, 100)
|
|
|
|
|> format("name", /^[a-z]$/i)
|
|
|
|
|> Person.insertIntoDatabase;
|
|
|
|
}
|
|
|
|
|
2018-05-24 23:06:33 +03:00
|
|
|
foo |> bar ?? baz;
|
|
|
|
(foo |> bar) ?? baz;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-10-16 01:13:25 +03:00
|
|
|
`;
|