Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update snapshots #6366

Merged
merged 4 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ on:
pull_request:

jobs:
unitTest:
name: Unit Test
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn

- run: yarn --frozen-lockfile
- run: yarn jest

lint:
name: Lint
strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ exports[`cleanup readme should clean up div[align="center"] block with paragraph
"/* @jsxRuntime classic */
/* @jsx mdx */
/* @jsxFrag mdx.Fragment */
const MDXLayout = \\"wrapper\\";
const MDXLayout = "wrapper";
function MDXContent({components, ...props}) {
return <MDXLayout components={components} {...props}><div align=\\"center\\"><p parentName=\\"div\\"><h1 parentName=\\"p\\">{\\"Imagemin Webpack\\"}</h1></p><p parentName=\\"div\\"><p parentName=\\"p\\">{\\"Plugin and Loader for \\"}<a href=\\"http://webpack.js.org/\\" parentName=\\"p\\">{\\"webpack\\"}</a>{\\" to optimize (compress) all images using \\"}<a href=\\"https://github.com/imagemin/imagemin\\" parentName=\\"p\\">{\\"imagemin\\"}</a>{\\".\\\\nDo not worry about size of images, now they are always optimized/compressed.\\"}</p></p></div></MDXLayout>;
return <MDXLayout components={components} {...props}><div align="center"><p parentName="div"><h1 parentName="p">{"Imagemin Webpack"}</h1></p><p parentName="div"><p parentName="p">{"Plugin and Loader for "}<a href="http://webpack.js.org/" parentName="p">{"webpack"}</a>{" to optimize (compress) all images using "}<a href="https://github.com/imagemin/imagemin" parentName="p">{"imagemin"}</a>{".\\nDo not worry about size of images, now they are always optimized/compressed."}</p></p></div></MDXLayout>;
}
MDXContent.isMDXComponent = true;
export default MDXContent;
Expand All @@ -17,9 +17,9 @@ exports[`cleanup readme should clean up div[align="center"] block without paragr
"/* @jsxRuntime classic */
/* @jsx mdx */
/* @jsxFrag mdx.Fragment */
const MDXLayout = \\"wrapper\\";
const MDXLayout = "wrapper";
function MDXContent({components, ...props}) {
return <MDXLayout components={components} {...props}><div align=\\"center\\" /></MDXLayout>;
return <MDXLayout components={components} {...props}><div align="center" /></MDXLayout>;
}
MDXContent.isMDXComponent = true;
export default MDXContent;
Expand All @@ -30,9 +30,9 @@ exports[`cleanup readme should clean up nested div[align="center"] block 1`] =
"/* @jsxRuntime classic */
/* @jsx mdx */
/* @jsxFrag mdx.Fragment */
const MDXLayout = \\"wrapper\\";
const MDXLayout = "wrapper";
function MDXContent({components, ...props}) {
return <MDXLayout components={components} {...props}><div align=\\"center\\" /></MDXLayout>;
return <MDXLayout components={components} {...props}><div align="center" /></MDXLayout>;
}
MDXContent.isMDXComponent = true;
export default MDXContent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`customize blockquote should transform W> into aside of warning 1`] = `
"<aside class=\\"warning\\"><h6 class=\\"warning__prefix\\">warning</h6><p>hello world</p></aside>
"<aside class="warning"><h6 class="warning__prefix">warning</h6><p>hello world</p></aside>
"
`;
4 changes: 3 additions & 1 deletion src/remark-plugins/remark-custom-asides/index.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ describe('customize blockquote', () => {
'W>': 'warning',
},
})
.use(remarkHtml)
.use(remarkHtml, {
sanitize: false
})
.process(
`
W> hello world
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`customize blockquote should add id 1`] = `
"<h2><span id=\\"user-content-hello-world\\"></span>hello world</h2>
"<h2><span id="user-content-hello-world"></span>hello world</h2>
<p>this is me.</p>
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ exports[`responsive table should add data-th 1`] = `
</thead>
<tbody>
<tr>
<td data-th=\\"foo\\"><span>baz</span></td>
<td data-th=\\"bar\\"><span>-</span></td>
<td data-th="foo"><span>baz</span></td>
<td data-th="bar"><span>-</span></td>
</tr>
<tr>
<td data-th=\\"foo\\"><span>sam</span></td>
<td data-th=\\"bar\\"><span>chen</span></td>
<td data-th="foo"><span>sam</span></td>
<td data-th="bar"><span>chen</span></td>
</tr>
</tbody>
</table>
Expand All @@ -32,12 +32,12 @@ exports[`responsive table should handle empty thead 1`] = `
</thead>
<tbody>
<tr>
<td data-th=\\"\\"><span>baz</span></td>
<td data-th=\\"bar\\"><span>-</span></td>
<td data-th=""><span>baz</span></td>
<td data-th="bar"><span>-</span></td>
</tr>
<tr>
<td data-th=\\"\\"><span>sam</span></td>
<td data-th=\\"bar\\"><span>chen</span></td>
<td data-th=""><span>sam</span></td>
<td data-th="bar"><span>chen</span></td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ describe('responsive table', () => {
const processor = remark()
.use(remarkGfm)
.use(remarkResponsiveTable)
.use(remarkHtml);
.use(remarkHtml, {
sanitize: false,
});
it('should add data-th', () => {
processor.process(
`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`remark slug should add id 1`] = `
"<h2 id=\\"user-content-hello-world\\"><span id=\\"user-content-hello-world\\"></span>hello world</h2>
"<h2 id="user-content-hello-world"><span id="user-content-hello-world"></span>hello world</h2>
<p>this is me.</p>
"
`;
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11846,7 +11846,7 @@ unist-util-visit-parents@^4.0.0:
"@types/unist" "^2.0.0"
unist-util-is "^5.0.0"

unist-util-visit-parents@^5.1.1:
unist-util-visit-parents@^5.0.0, unist-util-visit-parents@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-5.1.1.tgz#868f353e6fce6bf8fa875b251b0f4fec3be709bb"
integrity sha512-gks4baapT/kNRaWxuGkl5BIhoanZo7sC/cUT/JToSRNL1dYoXRFl75d++NkjYk4TAu2uv2Px+l8guMajogeuiw==
Expand Down