347 lines
6.1 KiB
Plaintext
347 lines
6.1 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`comments.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
switch (true) {
|
|
case true:
|
|
// Good luck getting here
|
|
|
|
case false:
|
|
}
|
|
|
|
switch (true) {
|
|
case true:
|
|
|
|
// Good luck getting here
|
|
case false:
|
|
}
|
|
|
|
switch(x) {
|
|
case x: {
|
|
}
|
|
|
|
// other
|
|
|
|
case y: {
|
|
}
|
|
}
|
|
|
|
=====================================output=====================================
|
|
switch (true) {
|
|
case true:
|
|
// Good luck getting here
|
|
|
|
case false:
|
|
}
|
|
|
|
switch (true) {
|
|
case true:
|
|
|
|
// Good luck getting here
|
|
case false:
|
|
}
|
|
|
|
switch (x) {
|
|
case x: {
|
|
}
|
|
|
|
// other
|
|
|
|
case y: {
|
|
}
|
|
}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`empty_lines.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
switch (foo) {
|
|
case "bar":
|
|
doSomething();
|
|
|
|
case "baz":
|
|
doOtherThing();
|
|
}
|
|
|
|
switch (foo) {
|
|
|
|
case "bar":
|
|
doSomething();
|
|
|
|
case "baz":
|
|
doOtherThing();
|
|
}
|
|
|
|
switch (foo) {
|
|
case "bar":
|
|
doSomething();
|
|
|
|
case "baz":
|
|
doOtherThing();
|
|
|
|
}
|
|
|
|
switch (foo) {
|
|
case "bar":
|
|
doSomething();
|
|
|
|
|
|
|
|
case "baz":
|
|
doOtherThing();
|
|
}
|
|
|
|
switch (x) {
|
|
case y:
|
|
call();
|
|
|
|
break;
|
|
|
|
case z:
|
|
call();
|
|
|
|
break;
|
|
}
|
|
|
|
switch (a) {
|
|
case b:
|
|
if (1) {};
|
|
c;
|
|
}
|
|
|
|
switch (a) {
|
|
case x:
|
|
case y:
|
|
call();
|
|
|
|
case z:
|
|
call();
|
|
}
|
|
|
|
switch (a) {
|
|
case x: case y:
|
|
call();
|
|
|
|
case z:
|
|
call();
|
|
}
|
|
|
|
=====================================output=====================================
|
|
switch (foo) {
|
|
case "bar":
|
|
doSomething();
|
|
|
|
case "baz":
|
|
doOtherThing();
|
|
}
|
|
|
|
switch (foo) {
|
|
case "bar":
|
|
doSomething();
|
|
|
|
case "baz":
|
|
doOtherThing();
|
|
}
|
|
|
|
switch (foo) {
|
|
case "bar":
|
|
doSomething();
|
|
|
|
case "baz":
|
|
doOtherThing();
|
|
}
|
|
|
|
switch (foo) {
|
|
case "bar":
|
|
doSomething();
|
|
|
|
case "baz":
|
|
doOtherThing();
|
|
}
|
|
|
|
switch (x) {
|
|
case y:
|
|
call();
|
|
|
|
break;
|
|
|
|
case z:
|
|
call();
|
|
|
|
break;
|
|
}
|
|
|
|
switch (a) {
|
|
case b:
|
|
if (1) {
|
|
}
|
|
c;
|
|
}
|
|
|
|
switch (a) {
|
|
case x:
|
|
case y:
|
|
call();
|
|
|
|
case z:
|
|
call();
|
|
}
|
|
|
|
switch (a) {
|
|
case x:
|
|
case y:
|
|
call();
|
|
|
|
case z:
|
|
call();
|
|
}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`empty_statement.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
switch (error.code) {
|
|
case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: {
|
|
nls.localize('errorInvalidConfiguration', "Unable to write into settings. Correct errors/warnings in the file and try again.");
|
|
};
|
|
}
|
|
|
|
=====================================output=====================================
|
|
switch (error.code) {
|
|
case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: {
|
|
nls.localize(
|
|
"errorInvalidConfiguration",
|
|
"Unable to write into settings. Correct errors/warnings in the file and try again."
|
|
);
|
|
}
|
|
}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`empty_switch.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
switch (1) { default:; }
|
|
switch (1) {}
|
|
|
|
=====================================output=====================================
|
|
switch (1) {
|
|
default:
|
|
}
|
|
switch (1) {
|
|
}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`switch.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
switch (a) {
|
|
case 3:
|
|
alert( '3' );
|
|
break;
|
|
case 4:
|
|
alert( '4' );
|
|
break;
|
|
case 5:
|
|
alert( '5' );
|
|
break;
|
|
default:
|
|
alert( 'default' );
|
|
}
|
|
|
|
switch (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong) {
|
|
case 3:
|
|
alert( '3' );
|
|
break;
|
|
default:
|
|
alert( 'default' );
|
|
}
|
|
|
|
switch (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong > veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong) {
|
|
case 3:
|
|
alert( '3' );
|
|
break;
|
|
default:
|
|
alert( 'default' );
|
|
}
|
|
|
|
switch ($veryLongAndVeryVerboseVariableName && $anotherVeryLongAndVeryVerboseVariableName) {
|
|
}
|
|
|
|
switch ($longButSlightlyShorterVariableName && $anotherSlightlyShorterVariableName) {
|
|
}
|
|
|
|
=====================================output=====================================
|
|
switch (a) {
|
|
case 3:
|
|
alert("3");
|
|
break;
|
|
case 4:
|
|
alert("4");
|
|
break;
|
|
case 5:
|
|
alert("5");
|
|
break;
|
|
default:
|
|
alert("default");
|
|
}
|
|
|
|
switch (
|
|
veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong
|
|
) {
|
|
case 3:
|
|
alert("3");
|
|
break;
|
|
default:
|
|
alert("default");
|
|
}
|
|
|
|
switch (
|
|
veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong >
|
|
veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong
|
|
) {
|
|
case 3:
|
|
alert("3");
|
|
break;
|
|
default:
|
|
alert("default");
|
|
}
|
|
|
|
switch (
|
|
$veryLongAndVeryVerboseVariableName &&
|
|
$anotherVeryLongAndVeryVerboseVariableName
|
|
) {
|
|
}
|
|
|
|
switch (
|
|
$longButSlightlyShorterVariableName &&
|
|
$anotherSlightlyShorterVariableName
|
|
) {
|
|
}
|
|
|
|
================================================================================
|
|
`;
|