Skip to content

Commit

Permalink
修改schemaToMarkdown的测试数据
Browse files Browse the repository at this point in the history
  • Loading branch information
222chaos committed Nov 11, 2024
1 parent 4904372 commit 308b45b
Show file tree
Hide file tree
Showing 3 changed files with 404 additions and 71 deletions.
146 changes: 119 additions & 27 deletions tests/editor/utils/__snapshots__/schemaToMarkdown.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,39 +1,131 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`schemaToMarkdown > should convert schema nodes back to the expected Markdown format 1`] = `
"# Heading 1
exports[`schemaToMarkdown with incremental insertion in 200-character chunks > should correctly convert schema nodes for Markdown input in 200-character chunks 1`] = `
"## 创始人
This is a paragraph with **bold** and *italic* text.
腾讯,全称深圳市腾讯计算机系统有限公司,是由五位创始人共同创立的,他们是马化腾、张志东、许晨晔、陈一丹和曾李青。 以下是关于这些创始人的详细信息: 马化腾 马化腾,1971 年 10 月 29 日出生于广东省东方县(现海南省东方市)八所港,广东汕头人,汉族,无党派人士。他毕业于深圳大学电子工程系计算机专业。马化腾是腾讯科技(深圳)有限公司的创始人、董事会主席、首席执行官,并曾是中华人民共和国第十二、十三届全国人民代表大会代表 。马化腾在 1998 年 11 月 11 日与合伙人共同注册成立了腾讯,并在 2004 年 6 月 16 日带领腾讯在香港联合交易所有限公司主板上市。 张志东 张志东,马化腾的同学,被称为 QQ 之父。他的计算机技术非常出色,曾是深圳大学最拔尖的学生之一。张志东在腾讯担任 CTO,并在 2014 年 9 月离职,转任腾讯公司终身荣誉顾问及腾讯学院荣誉院长等职位 。
- List item 1
- List item 2"
`;
<!--{"MarkdownType":"section","id":"16"}-->
exports[`schemaToMarkdown > should correctly convert schema nodes for: Basic heading and paragraph with bold and italic 1`] = `
"# Heading 1
<!-- {"MarkdownType": "section", "id": "16" } -->
This is a paragraph with **bold** and *italic* text.
- List item 1
- List item 2"
`;
<!--{"MarkdownType":"section","id":"16"}-->
## 表格
## 定义列表
## Bar 图表
<!--{"chartType":"bar","x":"业务","y":"2021Q1"}-->
<!-- {"chartType": "bar", "x":"业务", "y":"2021Q1"} -->
<!--{"chartType":"bar","x":"业务","y":"2021Q1"}-->
## Line 图表
<!--{"chartType":"line","x":"业务","y":"2021Q1"}-->
<!-- {"chartType": "line", "x":"业务", "y":"2021Q1"} -->
<!--{"chartType":"line","x":"业务","y":"2021Q1"}-->
## 图表 column
<!--{"chartType":"column","x":"业务","y":"2021Q1"}-->
<!-- {"chartType": "column", "x":"业务", "y":"2021Q1"} -->
<!--{"chartType":"column","x":"业务","y":"2021Q1"}-->
## 图表 pie
<!--{"chartType":"pie","x":"业务","y":"2021Q1"}-->
<!-- {"chartType": "pie", "x":"业务", "y":"2021Q1"} -->
exports[`schemaToMarkdown > should correctly convert schema nodes for: Blockquote and nested list 1`] = `
"> This is a blockquote.
>
> - Nested list item
> - Another nested item"
`;
exports[`schemaToMarkdown > should correctly convert schema nodes for: Code block with syntax highlighting 1`] = `
"<!--{}-->
\`\`\`javascript
function hello() {
console.log('Hello, world!');
<!--{"chartType":"pie","x":"业务","y":"2021Q1"}-->
## 图表 area
<!--{"chartType":"area","x":"业务","y":"2021Q1"}-->
<!-- {"chartType": "area", "x":"业务", "y":"2021Q1"} -->
<!--{"chartType":"area","x":"业务","y":"2021Q1"}-->
## 图片
<iframe src="https://mdn.alipayobjects.com/huamei_gcee1x/afts/img/A*9F0qRYV8EjUAAAAAAAAAAAAADml6AQ/original"/>
## 视频
<video src="https://gw.alipayobjects.com/v/huamei_gcee1x/afts/video/A*NudQQry0ERwAAAAAAAAAAAAADtN3AQ"/>
## 附件
<!--{"updateTime":"2014-07-29","collaborators":[{"Chen Shuai":33},{"Chen Shuai":33},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33},{"Rui Ma":39},{"ivan.cseeing":32},{"InvRet Sales Team":34},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33}]}-->
<!-- {"updateTime":"2014-07-29","collaborators":[{"Chen Shuai":33},{"Chen Shuai":33},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33},{"Rui Ma":39},{"ivan.cseeing":32},{"InvRet Sales Team":34},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33}]} -->
<!--{"updateTime":"2014-07-29","collaborators":[{"Chen Shuai":33},{"Chen Shuai":33},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33},{"Rui Ma":39},{"ivan.cseeing":32},{"InvRet Sales Team":34},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33},{"Rui Ma":39},{"Rui Ma":39},{"Chen Shuai":33}]}-->
<iframe src="https://gw.alipayobjects.com/v/huamei_gcee1x/afts/video/A*NudQQry0ERwAAAAAAAAAAAAADtN3AQ"/>
## 引用
上上任的武汉大学校长是李晓红。[^1][^2]
> 数据来自 [^3]
## 列表
腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群腾讯六大事业群
- 互动娱乐事业群
- 企业服务事业群
- **微信**事业群
- 互联网平台事业群
- 技术工程事业群
## 表单
<!--{}-->
\`\`\`schema
{}
\`\`\`
## 代码
<!--{}-->
\`\`\`java
Class A {
main() {
System.out.println("Hello World");
}
}
\`\`\`"
`;
\`\`\`
exports[`schemaToMarkdown > should correctly convert schema nodes for: Table structure 1`] = `""`;
## 删除线
exports[`schemaToMarkdown > should handle an empty schema 1`] = `""`;
~~腾讯六大事业群腾讯六大事业群腾讯六大事业群~~"
`;
Loading

0 comments on commit 308b45b

Please sign in to comment.