fix: 优化配置对象的处理逻辑,确保兼容性和稳定性 #540
codecov.yml
on: push
Run tests and collect coverage
1m 39s
Annotations
10 errors
tests/editor/utils/schemaToMarkdown.test.tsx > should convert markdown to schema in 表格
| 业务 chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L283
Error: Snapshot `should convert markdown to schema in 表格
| 业务 chunk 1` mismatched
- Expected
+ Received
@@ -1536,10 +1536,11 @@
"dataIndex": "2023Q4",
"key": "2023Q4",
"title": "2023Q4",
},
],
+ "config": {},
"dataSource": [
{
"2021Q1": "135,303",
"2021Q2": "138,259",
"2021Q3": "142,368",
❯ tests/editor/utils/schemaToMarkdown.test.tsx:283:22
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert schema to markdown in Bar 图表
< chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L276
Error: Snapshot `should convert schema to markdown in Bar 图表
< chunk 1` mismatched
- Expected
+ Received
@@ -1,11 +1,11 @@
"## Bar 图表
<!--{"chartType":"bar","x":"业务","y":"2021Q1"}-->
- <!--{"chartType":"bar","x":"业务","y":"2021Q1"}-->
+ <!--{"config":{"chartType":"bar","x":"业务","y":"2021Q1"}}-->
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 |
| ------------ | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 |
| 增值服务 | 72,443 | 72,013 | 75,203 | 71,913 |
| 网络游戏 | 43,600 | 43,000 | 44,900 | 42,800 |
❯ tests/editor/utils/schemaToMarkdown.test.tsx:276:24
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert markdown to schema in Bar 图表
< chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L283
Error: Snapshot `should convert markdown to schema in Bar 图表
< chunk 1` mismatched
- Expected
+ Received
@@ -605,11 +605,10 @@
],
"type": "table-row",
},
],
"otherProps": {
- "chartType": "bar",
"columns": [
{
"dataIndex": "业务",
"key": "业务",
"title": "业务",
@@ -633,10 +632,15 @@
"dataIndex": "2021Q4",
"key": "2021Q4",
"title": "2021Q4",
},
],
+ "config": {
+ "chartType": "bar",
+ "x": "业务",
+ "y": "2021Q1",
+ },
"dataSource": [
{
"2021Q1": "135,303",
"2021Q2": "138,259",
"2021Q3": "142,368",
@@ -691,12 +695,10 @@
"2021Q3": "111,353",
"2021Q4": "112,799",
"业务": "云",
},
],
- "x": "业务",
- "y": "2021Q1",
},
"type": "chart",
},
{
"children": [
❯ tests/editor/utils/schemaToMarkdown.test.tsx:283:22
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert schema to markdown in Line 图表
chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L276
Error: Snapshot `should convert schema to markdown in Line 图表
chunk 1` mismatched
- Expected
+ Received
@@ -1,11 +1,11 @@
"## Line 图表
<!--{"chartType":"line","x":"业务","y":"2021Q1"}-->
- <!--{"chartType":"line","x":"业务","y":"2021Q1"}-->
+ <!--{"config":{"chartType":"line","x":"业务","y":"2021Q1"}}-->
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 |
| ------------ | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 |
| 增值服务 | 72,443 | 72,013 | 75,203 | 71,913 |
| 网络游戏 | 43,600 | 43,000 | 44,900 | 42,800 |
❯ tests/editor/utils/schemaToMarkdown.test.tsx:276:24
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert markdown to schema in Line 图表
chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L283
Error: Snapshot `should convert markdown to schema in Line 图表
chunk 1` mismatched
- Expected
+ Received
@@ -605,11 +605,10 @@
],
"type": "table-row",
},
],
"otherProps": {
- "chartType": "line",
"columns": [
{
"dataIndex": "业务",
"key": "业务",
"title": "业务",
@@ -633,10 +632,15 @@
"dataIndex": "2021Q4",
"key": "2021Q4",
"title": "2021Q4",
},
],
+ "config": {
+ "chartType": "line",
+ "x": "业务",
+ "y": "2021Q1",
+ },
"dataSource": [
{
"2021Q1": "135,303",
"2021Q2": "138,259",
"2021Q3": "142,368",
@@ -691,12 +695,10 @@
"2021Q3": "111,353",
"2021Q4": "112,799",
"业务": "云",
},
],
- "x": "业务",
- "y": "2021Q1",
},
"type": "chart",
},
{
"children": [
❯ tests/editor/utils/schemaToMarkdown.test.tsx:283:22
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert schema to markdown in 图表 column chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L276
Error: Snapshot `should convert schema to markdown in 图表 column chunk 1` mismatched
- Expected
+ Received
@@ -1,11 +1,11 @@
"## 图表 column
<!--{"chartType":"column","x":"业务","y":"2021Q1"}-->
- <!--{"chartType":"column","x":"业务","y":"2021Q1"}-->
+ <!--{"config":{"chartType":"column","x":"业务","y":"2021Q1"}}-->
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 |
| ------------ | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 |
| 增值服务 | 72,443 | 72,013 | 75,203 | 71,913 |
| 网络游戏 | 43,600 | 43,000 | 44,900 | 42,800 |
❯ tests/editor/utils/schemaToMarkdown.test.tsx:276:24
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert markdown to schema in 图表 column chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L283
Error: Snapshot `should convert markdown to schema in 图表 column chunk 1` mismatched
- Expected
+ Received
@@ -605,11 +605,10 @@
],
"type": "table-row",
},
],
"otherProps": {
- "chartType": "column",
"columns": [
{
"dataIndex": "业务",
"key": "业务",
"title": "业务",
@@ -633,10 +632,15 @@
"dataIndex": "2021Q4",
"key": "2021Q4",
"title": "2021Q4",
},
],
+ "config": {
+ "chartType": "column",
+ "x": "业务",
+ "y": "2021Q1",
+ },
"dataSource": [
{
"2021Q1": "135,303",
"2021Q2": "138,259",
"2021Q3": "142,368",
@@ -691,12 +695,10 @@
"2021Q3": "111,353",
"2021Q4": "112,799",
"业务": "云",
},
],
- "x": "业务",
- "y": "2021Q1",
},
"type": "chart",
},
{
"children": [
❯ tests/editor/utils/schemaToMarkdown.test.tsx:283:22
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert schema to markdown in 图表 pie
< chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L276
Error: Snapshot `should convert schema to markdown in 图表 pie
< chunk 1` mismatched
- Expected
+ Received
@@ -1,11 +1,11 @@
"## 图表 pie
<!--{"chartType":"pie","x":"业务","y":"2021Q1"}-->
- <!--{"chartType":"pie","x":"业务","y":"2021Q1"}-->
+ <!--{"config":{"chartType":"pie","x":"业务","y":"2021Q1"}}-->
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 |
| ------------ | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 |
| 增值服务 | 72,443 | 72,013 | 75,203 | 71,913 |
| 网络游戏 | 43,600 | 43,000 | 44,900 | 42,800 |
❯ tests/editor/utils/schemaToMarkdown.test.tsx:276:24
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert markdown to schema in 图表 pie
< chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L283
Error: Snapshot `should convert markdown to schema in 图表 pie
< chunk 1` mismatched
- Expected
+ Received
@@ -605,11 +605,10 @@
],
"type": "table-row",
},
],
"otherProps": {
- "chartType": "pie",
"columns": [
{
"dataIndex": "业务",
"key": "业务",
"title": "业务",
@@ -633,10 +632,15 @@
"dataIndex": "2021Q4",
"key": "2021Q4",
"title": "2021Q4",
},
],
+ "config": {
+ "chartType": "pie",
+ "x": "业务",
+ "y": "2021Q1",
+ },
"dataSource": [
{
"2021Q1": "135,303",
"2021Q2": "138,259",
"2021Q3": "142,368",
@@ -691,12 +695,10 @@
"2021Q3": "111,353",
"2021Q4": "112,799",
"业务": "云",
},
],
- "x": "业务",
- "y": "2021Q1",
},
"type": "chart",
},
{
"children": [
❯ tests/editor/utils/schemaToMarkdown.test.tsx:283:22
|
tests/editor/utils/schemaToMarkdown.test.tsx > should convert schema to markdown in 图表 area
chunk:
tests/editor/utils/schemaToMarkdown.test.tsx#L276
Error: Snapshot `should convert schema to markdown in 图表 area
chunk 1` mismatched
- Expected
+ Received
@@ -1,11 +1,11 @@
"## 图表 area
<!--{"chartType":"area","x":"业务","y":"2021Q1"}-->
- <!--{"chartType":"area","x":"业务","y":"2021Q1"}-->
+ <!--{"config":{"chartType":"area","x":"业务","y":"2021Q1"}}-->
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 |
| ------------ | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 |
| 增值服务 | 72,443 | 72,013 | 75,203 | 71,913 |
| 网络游戏 | 43,600 | 43,000 | 44,900 | 42,800 |
❯ tests/editor/utils/schemaToMarkdown.test.tsx:276:24
|