38 lines
903 B
Plaintext
38 lines
903 B
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`nullish_coalesing_operator.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["babel", "flow"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
obj.foo ?? "default";
|
|
|
|
const x = (foo, bar = foo ?? bar) => {};
|
|
|
|
foo ? bar ?? foo : baz;
|
|
|
|
foo ?? (bar ?? baz);
|
|
|
|
foo ?? baz || baz;
|
|
|
|
(foo && baz) ?? baz;
|
|
foo && (baz ?? baz);
|
|
|
|
=====================================output=====================================
|
|
obj.foo ?? "default";
|
|
|
|
const x = (foo, bar = foo ?? bar) => {};
|
|
|
|
foo ? bar ?? foo : baz;
|
|
|
|
foo ?? (bar ?? baz);
|
|
|
|
foo ?? baz || baz;
|
|
|
|
(foo && baz) ?? baz;
|
|
foo && (baz ?? baz);
|
|
|
|
================================================================================
|
|
`;
|