generated from ony3000/node-library-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,176 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
tests/v2-test/markdown/issue-80/__snapshots__/absolute.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`'(1) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
<div /> | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(2) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
import foo from "foo"; | ||
<div />; | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(3) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(4) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
<div /> | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(5) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
import foo from "foo"; | ||
<div />; | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(6) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
" | ||
`; |
59 changes: 59 additions & 0 deletions
59
tests/v2-test/markdown/issue-80/__snapshots__/ideal.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`'(1) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
<div /> | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(2) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
import foo from "foo"; | ||
<div />; | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(3) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(4) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
<div /> | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(5) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
import foo from "foo"; | ||
<div />; | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(6) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
" | ||
`; |
59 changes: 59 additions & 0 deletions
59
tests/v2-test/markdown/issue-80/__snapshots__/relative.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`'(1) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
<div /> | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(2) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
import foo from "foo"; | ||
<div />; | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(3) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(4) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
<div /> | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(5) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
import foo from "foo"; | ||
<div />; | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(6) This plugin doesn\\'t support markdown parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { baseOptions } from 'test-settings'; | ||
|
||
import { thisPlugin, testSnapshotEach } from '../../adaptor'; | ||
import { fixtures } from './fixtures'; | ||
|
||
const options = { | ||
...baseOptions, | ||
plugins: [thisPlugin], | ||
parser: 'markdown', | ||
endingPosition: 'absolute', | ||
}; | ||
|
||
testSnapshotEach(fixtures, options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import type { Fixture } from 'test-settings'; | ||
|
||
export const fixtures: Omit<Fixture, 'output'>[] = [ | ||
{ | ||
name: "(1) This plugin doesn't support markdown parser, so it leaves Prettier's output as is.", | ||
input: ` | ||
\`\`\`jsx | ||
<div />; | ||
\`\`\` | ||
`, | ||
options: {}, | ||
}, | ||
{ | ||
name: "(2) This plugin doesn't support markdown parser, so it leaves Prettier's output as is.", | ||
input: ` | ||
\`\`\`jsx | ||
import foo from 'foo' | ||
<div /> | ||
\`\`\` | ||
`, | ||
options: {}, | ||
}, | ||
{ | ||
name: "(3) This plugin doesn't support markdown parser, so it leaves Prettier's output as is.", | ||
input: ` | ||
\`\`\`jsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
`, | ||
options: { | ||
printWidth: 60, | ||
}, | ||
}, | ||
{ | ||
name: "(4) This plugin doesn't support markdown parser, so it leaves Prettier's output as is.", | ||
input: ` | ||
\`\`\`tsx | ||
<div />; | ||
\`\`\` | ||
`, | ||
options: {}, | ||
}, | ||
{ | ||
name: "(5) This plugin doesn't support markdown parser, so it leaves Prettier's output as is.", | ||
input: ` | ||
\`\`\`tsx | ||
import foo from 'foo' | ||
<div /> | ||
\`\`\` | ||
`, | ||
options: {}, | ||
}, | ||
{ | ||
name: "(6) This plugin doesn't support markdown parser, so it leaves Prettier's output as is.", | ||
input: ` | ||
\`\`\`tsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
`, | ||
options: { | ||
printWidth: 60, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { baseOptions } from 'test-settings'; | ||
|
||
import { thisPlugin, testSnapshotEach } from '../../adaptor'; | ||
import { fixtures } from './fixtures'; | ||
|
||
const options = { | ||
...baseOptions, | ||
plugins: [thisPlugin], | ||
parser: 'markdown', | ||
endingPosition: 'absolute-with-indent', | ||
}; | ||
|
||
testSnapshotEach(fixtures, options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { baseOptions } from 'test-settings'; | ||
|
||
import { thisPlugin, testSnapshotEach } from '../../adaptor'; | ||
import { fixtures } from './fixtures'; | ||
|
||
const options = { | ||
...baseOptions, | ||
plugins: [thisPlugin], | ||
parser: 'markdown', | ||
endingPosition: 'relative', | ||
}; | ||
|
||
testSnapshotEach(fixtures, options); |
59 changes: 59 additions & 0 deletions
59
tests/v2-test/mdx/issue-80/__snapshots__/absolute.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`'(1) This plugin doesn\\'t support mdx parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
<div /> | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(2) This plugin doesn\\'t support mdx parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
import foo from "foo"; | ||
<div />; | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(3) This plugin doesn\\'t support mdx parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`jsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(4) This plugin doesn\\'t support mdx parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
<div /> | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(5) This plugin doesn\\'t support mdx parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
import foo from "foo"; | ||
<div />; | ||
\`\`\` | ||
" | ||
`; | ||
|
||
exports[`'(6) This plugin doesn\\'t support mdx parser, so it leaves Prettier\\'s output as is.' > expectation 1`] = ` | ||
"\`\`\`tsx | ||
export function Foo({ children }) { | ||
return ( | ||
<div className="lorem ipsum dolor sit amet consectetur adipiscing elit proin ex massa hendrerit eu posuere eu volutpat id neque pellentesque"> | ||
{children} | ||
</div> | ||
); | ||
} | ||
\`\`\` | ||
" | ||
`; |
Oops, something went wrong.