514 lines
13 KiB
Plaintext
514 lines
13 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`class-declaration.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
|
|
|
|
class a {
|
|
b( ) {}
|
|
}
|
|
|
|
let x
|
|
=====================================output=====================================
|
|
|
|
|
|
class a {
|
|
b() {}
|
|
}
|
|
|
|
let x
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`different-levels.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
call(1,2,3)
|
|
call(1,2,3)
|
|
function f() {
|
|
call(1,2,3)
|
|
}
|
|
|
|
=====================================output=====================================
|
|
call(1,2,3)
|
|
call(1, 2, 3);
|
|
function f() {
|
|
call(1, 2, 3);
|
|
}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`function-declaration.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
function ugly ( {a=1, b = 2 } ) {}
|
|
|
|
=====================================output=====================================
|
|
function ugly({ a = 1, b = 2 }) {}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`ignore-indentation.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
\`multiline template string
|
|
with too much indentation\`
|
|
}
|
|
}
|
|
}
|
|
|
|
=====================================output=====================================
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
\`multiline template string
|
|
with too much indentation\`;
|
|
}
|
|
}
|
|
}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`module-export1.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
import def , {named} from 'x'
|
|
|
|
export * from 'd'
|
|
|
|
export const x
|
|
= 42
|
|
|
|
export default 42
|
|
|
|
|
|
=====================================output=====================================
|
|
import def , {named} from 'x'
|
|
|
|
export * from "d";
|
|
|
|
export const x
|
|
= 42
|
|
|
|
export default 42
|
|
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`module-export2.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
import def , {named} from 'x'
|
|
|
|
export * from 'd'
|
|
|
|
export const x
|
|
= 42
|
|
|
|
export default 42
|
|
|
|
|
|
=====================================output=====================================
|
|
import def , {named} from 'x'
|
|
|
|
export * from 'd'
|
|
|
|
export const x = 42;
|
|
|
|
export default 42
|
|
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`module-export3.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
import def , {named} from 'x'
|
|
|
|
export * from 'd'
|
|
|
|
export const x
|
|
= 42
|
|
|
|
export default 42
|
|
|
|
|
|
=====================================output=====================================
|
|
import def , {named} from 'x'
|
|
|
|
export * from 'd'
|
|
|
|
export const x
|
|
= 42
|
|
|
|
export default 42;
|
|
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`module-import.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
import def , {named} from 'x'
|
|
|
|
export * from 'd'
|
|
|
|
export const x
|
|
= 42
|
|
|
|
export default 42
|
|
|
|
|
|
=====================================output=====================================
|
|
import def, { named } from "x";
|
|
|
|
export * from 'd'
|
|
|
|
export const x
|
|
= 42
|
|
|
|
export default 42
|
|
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`multiple-statements.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
=====================================output=====================================
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
call(1, 2, 3);
|
|
|
|
call(1, 2, 3);
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`multiple-statements2.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
=====================================output=====================================
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
call(1, 2, 3);
|
|
|
|
call(1, 2, 3);
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`nested.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
try {
|
|
if (condition) {
|
|
body
|
|
}
|
|
}
|
|
catch (err) {}
|
|
|
|
=====================================output=====================================
|
|
try {
|
|
if (condition) {
|
|
body;
|
|
}
|
|
} catch (err) {}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`nested2.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
try {
|
|
if (condition) {
|
|
body
|
|
}
|
|
}
|
|
catch (err) {}
|
|
|
|
=====================================output=====================================
|
|
try {
|
|
if (condition) {
|
|
body;
|
|
}
|
|
}
|
|
catch (err) {}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`nested3.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
try {
|
|
1;if (condition) {
|
|
body
|
|
}
|
|
}
|
|
catch (err) {}
|
|
|
|
=====================================output=====================================
|
|
try {
|
|
1;if (condition) {
|
|
body;
|
|
}
|
|
}
|
|
catch (err) {}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`object-expression.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
const y = {a:1, b:2}
|
|
|
|
=====================================output=====================================
|
|
const y = { a: 1, b: 2 };
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`object-expression2.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
|
|
const y = [
|
|
{
|
|
a: 1,
|
|
},
|
|
{
|
|
a: 1,
|
|
b:2
|
|
},
|
|
]
|
|
|
|
=====================================output=====================================
|
|
|
|
const y = [
|
|
{
|
|
a: 1
|
|
},
|
|
{
|
|
a: 1,
|
|
b: 2
|
|
}
|
|
];
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`range.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
\`multiline template string
|
|
with too much indentation\`
|
|
}
|
|
}
|
|
}
|
|
|
|
=====================================output=====================================
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
function ugly ( {a=1, b = 2 } ) {
|
|
\`multiline template string
|
|
with too much indentation\`;
|
|
}
|
|
}
|
|
}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`range-end.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
// Unchanged
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
|
|
call(
|
|
1, 2,3
|
|
);
|
|
=====================================output=====================================
|
|
// Unchanged
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
|
|
call(1, 2, 3);
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`range-start.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
|
|
// Unchanged
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
=====================================output=====================================
|
|
call(1, 2, 3);
|
|
|
|
|
|
// Unchanged
|
|
call(
|
|
1, 2,3
|
|
);
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`try-catch.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
try {}
|
|
catch (err) {}
|
|
|
|
=====================================output=====================================
|
|
try {
|
|
} catch (err) {}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`whitespace.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
|
|
|
|
=====================================output=====================================
|
|
|
|
|
|
================================================================================
|
|
`;
|