136 lines
4.8 KiB
Plaintext
136 lines
4.8 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`generic-component.tsx 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
const c1 = <MyComponent<number> data={12} />
|
|
|
|
const c2 = <MyComponent<number> />
|
|
|
|
const c3 = <MyComponent<number> attr="value" />
|
|
|
|
=====================================output=====================================
|
|
const c1 = <MyComponent<number> data={12} />;
|
|
|
|
const c2 = <MyComponent<number> />;
|
|
|
|
const c3 = <MyComponent<number> attr="value" />;
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`keyword.tsx 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
<try />;
|
|
<object />
|
|
|
|
=====================================output=====================================
|
|
<try />;
|
|
<object />;
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`not-react.ts 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
/// <reference types="node" />
|
|
|
|
type ul = any;
|
|
const somethingElse = 1;
|
|
const thing = <ul>somethingElse;
|
|
const div = "<div></div>";
|
|
const h1 = \`<h1>Hi</h1>\`;
|
|
const footer = '<footer></footer>';
|
|
|
|
=====================================output=====================================
|
|
/// <reference types="node" />
|
|
|
|
type ul = any;
|
|
const somethingElse = 1;
|
|
const thing = <ul>somethingElse;
|
|
const div = "<div></div>";
|
|
const h1 = \`<h1>Hi</h1>\`;
|
|
const footer = "<footer></footer>";
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`react.tsx 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
const MyCoolList = ({ things }) =>
|
|
<ul>
|
|
{things.map(MyCoolThing)}
|
|
</ul>;
|
|
|
|
const MyCoolThing = ({ thingo }) => <li>{thingo}</li>;
|
|
|
|
=====================================output=====================================
|
|
const MyCoolList = ({ things }) => <ul>{things.map(MyCoolThing)}</ul>;
|
|
|
|
const MyCoolThing = ({ thingo }) => <li>{thingo}</li>;
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`this.tsx 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
<this.state.Component />;
|
|
<this.Component />;
|
|
|
|
=====================================output=====================================
|
|
<this.state.Component />;
|
|
<this.Component />;
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`type-parameters.tsx 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
const functionName1 = <T,>(arg) => false;
|
|
const functionName2 = <T extends any>(arg) => false;
|
|
const functionName3 = <T, S>(arg) => false;
|
|
|
|
=====================================output=====================================
|
|
const functionName1 = <T,>(arg) => false;
|
|
const functionName2 = <T extends any>(arg) => false;
|
|
const functionName3 = <T, S>(arg) => false;
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`url.tsx 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
const link = <a href="example.com">http://example.com</a>
|
|
=====================================output=====================================
|
|
const link = <a href="example.com">http://example.com</a>;
|
|
|
|
================================================================================
|
|
`;
|