254 lines
6.3 KiB
Plaintext
254 lines
6.3 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`break.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
h(f(g(() => {
|
|
a
|
|
})))
|
|
|
|
deepCopyAndAsyncMapLeavesA(
|
|
{ source: sourceValue, destination: destination[sourceKey] },
|
|
{ valueMapper, overwriteExistingKeys }
|
|
)
|
|
|
|
deepCopyAndAsyncMapLeavesB(
|
|
1337,
|
|
{ source: sourceValue, destination: destination[sourceKey] },
|
|
{ valueMapper, overwriteExistingKeys }
|
|
)
|
|
|
|
deepCopyAndAsyncMapLeavesC(
|
|
{ source: sourceValue, destination: destination[sourceKey] },
|
|
1337,
|
|
{ valueMapper, overwriteExistingKeys }
|
|
)
|
|
|
|
function someFunction(url) {
|
|
return get(url)
|
|
.then(
|
|
json => dispatch(success(json)),
|
|
error => dispatch(failed(error))
|
|
);
|
|
}
|
|
|
|
const mapChargeItems = fp.flow(
|
|
l => l < 10 ? l: 1,
|
|
l => Immutable.Range(l).toMap()
|
|
);
|
|
|
|
expect(new LongLongLongLongLongRange([0, 0], [0, 0])).toEqualAtomLongLongLongLongRange(new LongLongLongRange([0, 0], [0, 0]));
|
|
|
|
["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce(
|
|
(allColors, color) => {
|
|
return allColors.concat(color);
|
|
},
|
|
[]
|
|
);
|
|
|
|
|
|
=====================================output=====================================
|
|
h(
|
|
f(
|
|
g(() => {
|
|
a;
|
|
})
|
|
)
|
|
);
|
|
|
|
deepCopyAndAsyncMapLeavesA(
|
|
{ source: sourceValue, destination: destination[sourceKey] },
|
|
{ valueMapper, overwriteExistingKeys }
|
|
);
|
|
|
|
deepCopyAndAsyncMapLeavesB(
|
|
1337,
|
|
{ source: sourceValue, destination: destination[sourceKey] },
|
|
{ valueMapper, overwriteExistingKeys }
|
|
);
|
|
|
|
deepCopyAndAsyncMapLeavesC(
|
|
{ source: sourceValue, destination: destination[sourceKey] },
|
|
1337,
|
|
{ valueMapper, overwriteExistingKeys }
|
|
);
|
|
|
|
function someFunction(url) {
|
|
return get(url).then(
|
|
json => dispatch(success(json)),
|
|
error => dispatch(failed(error))
|
|
);
|
|
}
|
|
|
|
const mapChargeItems = fp.flow(
|
|
l => (l < 10 ? l : 1),
|
|
l => Immutable.Range(l).toMap()
|
|
);
|
|
|
|
expect(
|
|
new LongLongLongLongLongRange([0, 0], [0, 0])
|
|
).toEqualAtomLongLongLongLongRange(new LongLongLongRange([0, 0], [0, 0]));
|
|
|
|
["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce(
|
|
(allColors, color) => {
|
|
return allColors.concat(color);
|
|
},
|
|
[]
|
|
);
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`parent.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
runtimeAgent.getProperties(
|
|
objectId,
|
|
false, // ownProperties
|
|
false, // accessorPropertiesOnly
|
|
false, // generatePreview
|
|
(error, properties, internalProperties) => {
|
|
return 1
|
|
},
|
|
);
|
|
|
|
=====================================output=====================================
|
|
runtimeAgent.getProperties(
|
|
objectId,
|
|
false, // ownProperties
|
|
false, // accessorPropertiesOnly
|
|
false, // generatePreview
|
|
(error, properties, internalProperties) => {
|
|
return 1;
|
|
}
|
|
);
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`react.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
function helloWorld() {
|
|
useEffect(() => {
|
|
// do something
|
|
}, [props.value])
|
|
useEffect(() => {
|
|
// do something
|
|
}, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value])
|
|
}
|
|
|
|
function helloWorldWithReact() {
|
|
React.useEffect(() => {
|
|
// do something
|
|
}, [props.value])
|
|
React.useEffect(() => {
|
|
// do something
|
|
}, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value])
|
|
}
|
|
|
|
function MyComponent(props) {
|
|
useEffect(
|
|
() => {
|
|
console.log("some code", props.foo);
|
|
},
|
|
|
|
// We need to disable the eslint warning here,
|
|
// because of some complicated reason.
|
|
// eslint-disable line react-hooks/exhaustive-deps
|
|
[]
|
|
);
|
|
|
|
return null;
|
|
}
|
|
|
|
=====================================output=====================================
|
|
function helloWorld() {
|
|
useEffect(() => {
|
|
// do something
|
|
}, [props.value]);
|
|
useEffect(() => {
|
|
// do something
|
|
}, [
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value
|
|
]);
|
|
}
|
|
|
|
function helloWorldWithReact() {
|
|
React.useEffect(() => {
|
|
// do something
|
|
}, [props.value]);
|
|
React.useEffect(() => {
|
|
// do something
|
|
}, [
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value,
|
|
props.value
|
|
]);
|
|
}
|
|
|
|
function MyComponent(props) {
|
|
useEffect(
|
|
() => {
|
|
console.log("some code", props.foo);
|
|
},
|
|
|
|
// We need to disable the eslint warning here,
|
|
// because of some complicated reason.
|
|
// eslint-disable line react-hooks/exhaustive-deps
|
|
[]
|
|
);
|
|
|
|
return null;
|
|
}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`type_args.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow", "typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
const response = something.$http.get<ThingamabobService.DetailsData>(
|
|
\`api/foo.ashx/foo-details/\${myId}\`,
|
|
{ cache: quux.httpCache, timeout }
|
|
);
|
|
|
|
=====================================output=====================================
|
|
const response = something.$http.get<ThingamabobService.DetailsData>(
|
|
\`api/foo.ashx/foo-details/\${myId}\`,
|
|
{ cache: quux.httpCache, timeout }
|
|
);
|
|
|
|
================================================================================
|
|
`;
|