prettier/tests/mdx/__snapshots__/jsfmt.spec.js.snap

585 lines
12 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`import-export.mdx 1`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
| printWidth
=====================================input======================================
import A from 'a'
import {A,B,C} from "hello-world"
import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz';
---
import A from 'a'
import {A,B,C} from "hello-world"
import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz';
---
export const meta = {
authors: [fred, sue],
layout: Layout
}
export default () =>
<Doc components={{
h1: ui.Heading,
p: ui.Text,
code: ui.Code
}}
/>
---
export const a = 1;
export const b = 1;
=====================================output=====================================
import A from "a";
import { A, B, C } from "hello-world";
import {
AAAAAAAAAAAAAAAAAAAAAAAA,
BBBBBBBBBBBBBBBBBBBBBB,
CCCCCCCCCCCCCCCCCCCCCCC
} from "xyz";
---
import A from "a";
import { A, B, C } from "hello-world";
import {
AAAAAAAAAAAAAAAAAAAAAAAA,
BBBBBBBBBBBBBBBBBBBBBB,
CCCCCCCCCCCCCCCCCCCCCCC
} from "xyz";
---
export const meta = {
authors: [fred, sue],
layout: Layout
};
export default () => (
<Doc
components={{
h1: ui.Heading,
p: ui.Text,
code: ui.Code
}}
/>
);
---
export const a = 1;
export const b = 1;
================================================================================
`;
exports[`import-export.mdx 2`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
import A from 'a'
import {A,B,C} from "hello-world"
import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz';
---
import A from 'a'
import {A,B,C} from "hello-world"
import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz';
---
export const meta = {
authors: [fred, sue],
layout: Layout
}
export default () =>
<Doc components={{
h1: ui.Heading,
p: ui.Text,
code: ui.Code
}}
/>
---
export const a = 1;
export const b = 1;
=====================================output=====================================
import A from "a"
import { A, B, C } from "hello-world"
import {
AAAAAAAAAAAAAAAAAAAAAAAA,
BBBBBBBBBBBBBBBBBBBBBB,
CCCCCCCCCCCCCCCCCCCCCCC
} from "xyz"
---
import A from "a"
import { A, B, C } from "hello-world"
import {
AAAAAAAAAAAAAAAAAAAAAAAA,
BBBBBBBBBBBBBBBBBBBBBB,
CCCCCCCCCCCCCCCCCCCCCCC
} from "xyz"
---
export const meta = {
authors: [fred, sue],
layout: Layout
}
export default () => (
<Doc
components={{
h1: ui.Heading,
p: ui.Text,
code: ui.Code
}}
/>
)
---
export const a = 1
export const b = 1
================================================================================
`;
exports[`inline-html.mdx 1`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
| printWidth
=====================================input======================================
This is an example of a component _being used in some italic markdown with some <Bolded />,
and as you can see_ once you close the italics, it will break incorrectly when prettier formats it.
| Column 1 | Column 2 |
| -- | -- |
| **\`Row 1 Code\`** | Some text. |
| **<code>Row 2 Code</code>** | Some text. |
| **<InlineCode>Row 2 Code</InlineCode>** | Some text. |
=====================================output=====================================
This is an example of a component _being used in some italic markdown with some <Bolded />,
and as you can see_ once you close the italics, it will break incorrectly when prettier formats it.
| Column 1 | Column 2 |
| --------------------------------------- | ---------- |
| **\`Row 1 Code\`** | Some text. |
| **<code>Row 2 Code</code>** | Some text. |
| **<InlineCode>Row 2 Code</InlineCode>** | Some text. |
================================================================================
`;
exports[`inline-html.mdx 2`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
This is an example of a component _being used in some italic markdown with some <Bolded />,
and as you can see_ once you close the italics, it will break incorrectly when prettier formats it.
| Column 1 | Column 2 |
| -- | -- |
| **\`Row 1 Code\`** | Some text. |
| **<code>Row 2 Code</code>** | Some text. |
| **<InlineCode>Row 2 Code</InlineCode>** | Some text. |
=====================================output=====================================
This is an example of a component _being used in some italic markdown with some <Bolded />,
and as you can see_ once you close the italics, it will break incorrectly when prettier formats it.
| Column 1 | Column 2 |
| --------------------------------------- | ---------- |
| **\`Row 1 Code\`** | Some text. |
| **<code>Row 2 Code</code>** | Some text. |
| **<InlineCode>Row 2 Code</InlineCode>** | Some text. |
================================================================================
`;
exports[`jsx.mdx 1`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
| printWidth
=====================================input======================================
<Heading hi='there'>Hello, world!
</Heading>
---
<Hello>
test <World /> test
</Hello>123
---
<Hello>
test <World /> test
</Hello>
<Hello>
test <World /> test
</Hello>123
---
| Column 1 | Column 2 |
|---|---|
| Text | <Hello>Text</Hello> |
=====================================output=====================================
<Heading hi="there">Hello, world!</Heading>
---
<Hello>
test <World /> test
</Hello>123
---
<Hello>
test <World /> test
</Hello>
<Hello>
test <World /> test
</Hello>123
---
| Column 1 | Column 2 |
| -------- | ------------------- |
| Text | <Hello>Text</Hello> |
================================================================================
`;
exports[`jsx.mdx 2`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
<Heading hi='there'>Hello, world!
</Heading>
---
<Hello>
test <World /> test
</Hello>123
---
<Hello>
test <World /> test
</Hello>
<Hello>
test <World /> test
</Hello>123
---
| Column 1 | Column 2 |
|---|---|
| Text | <Hello>Text</Hello> |
=====================================output=====================================
<Heading hi="there">Hello, world!</Heading>
---
<Hello>
test <World /> test
</Hello>123
---
<Hello>
test <World /> test
</Hello>
<Hello>
test <World /> test
</Hello>123
---
| Column 1 | Column 2 |
| -------- | ------------------- |
| Text | <Hello>Text</Hello> |
================================================================================
`;
exports[`jsx-codeblock.mdx 1`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
| printWidth
=====================================input======================================
\`\`\`jsx
<div>foo</div>
\`\`\`
\`\`\`jsx
const a = 1;
<div>foo</div>;
\`\`\`
=====================================output=====================================
\`\`\`jsx
<div>foo</div>
\`\`\`
\`\`\`jsx
const a = 1;
<div>foo</div>;
\`\`\`
================================================================================
`;
exports[`jsx-codeblock.mdx 2`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
\`\`\`jsx
<div>foo</div>
\`\`\`
\`\`\`jsx
const a = 1;
<div>foo</div>;
\`\`\`
=====================================output=====================================
\`\`\`jsx
<div>foo</div>
\`\`\`
\`\`\`jsx
const a = 1
;<div>foo</div>
\`\`\`
================================================================================
`;
exports[`mixed.mdx 1`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
| printWidth
=====================================input======================================
import { Baz } from './Fixture'
import { Buz } from './Fixture'
export const foo = {
hi: \`Fudge \${Baz.displayName || 'Baz'}\`,
authors: [
'fred',
'sally'
]
}
# Hello, world!
I'm an awesome paragraph.
<!-- I'm a comment -->
<Foo bg='red'>
<Bar >hi </Bar>
{ hello }
{ /* another commment */}
</Foo>
\`\`\`
test codeblock
\`\`\`
\`\`\`js
module.exports = 'test'
\`\`\`
\`\`\`sh
npm i -g foo
\`\`\`
| Test | Table |
| :--- | :---- |
| Col1 | Col2 |
export default ({children }) => < div>{ children}</div>
=====================================output=====================================
import { Baz } from "./Fixture";
import { Buz } from "./Fixture";
export const foo = {
hi: \`Fudge \${Baz.displayName || "Baz"}\`,
authors: ["fred", "sally"]
};
# Hello, world!
I'm an awesome paragraph.
<!-- I'm a comment -->
<Foo bg="red">
<Bar>hi </Bar>
{hello}
{/* another commment */}
</Foo>
\`\`\`
test codeblock
\`\`\`
\`\`\`js
module.exports = "test";
\`\`\`
\`\`\`sh
npm i -g foo
\`\`\`
| Test | Table |
| :--- | :---- |
| Col1 | Col2 |
export default ({ children }) => <div>{children}</div>;
================================================================================
`;
exports[`mixed.mdx 2`] = `
====================================options=====================================
parsers: ["mdx"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
import { Baz } from './Fixture'
import { Buz } from './Fixture'
export const foo = {
hi: \`Fudge \${Baz.displayName || 'Baz'}\`,
authors: [
'fred',
'sally'
]
}
# Hello, world!
I'm an awesome paragraph.
<!-- I'm a comment -->
<Foo bg='red'>
<Bar >hi </Bar>
{ hello }
{ /* another commment */}
</Foo>
\`\`\`
test codeblock
\`\`\`
\`\`\`js
module.exports = 'test'
\`\`\`
\`\`\`sh
npm i -g foo
\`\`\`
| Test | Table |
| :--- | :---- |
| Col1 | Col2 |
export default ({children }) => < div>{ children}</div>
=====================================output=====================================
import { Baz } from "./Fixture"
import { Buz } from "./Fixture"
export const foo = {
hi: \`Fudge \${Baz.displayName || "Baz"}\`,
authors: ["fred", "sally"]
}
# Hello, world!
I'm an awesome paragraph.
<!-- I'm a comment -->
<Foo bg="red">
<Bar>hi </Bar>
{hello}
{/* another commment */}
</Foo>
\`\`\`
test codeblock
\`\`\`
\`\`\`js
module.exports = "test"
\`\`\`
\`\`\`sh
npm i -g foo
\`\`\`
| Test | Table |
| :--- | :---- |
| Col1 | Col2 |
export default ({ children }) => <div>{children}</div>
================================================================================
`;