mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-01 09:30:01 +08:00
refactor(editor): enable the noUncheckedIndexedAccess rule for the block-database package (#9691)
close: BS-2269
This commit is contained in:
@@ -1441,7 +1441,7 @@ describe('snapshot to html', () => {
|
||||
],
|
||||
};
|
||||
const html = template(
|
||||
'<table><thead><tr><th>Title</th><th>Status</th><th>Date</th><th>Number</th><th>Progress</th><th>MultiSelect</th><th>RichText</th><th>Link</th><th>Checkbox</th></tr></thead><tbody><tr><td>Task 1</td><td>TODO</td><td>2023-12-15</td><td>1</td><td>65</td><td>test1,test2</td><td><a href="https://google.com">test2</a></td><td>https://google.com</td><td>true</td></tr><tr><td>Task 2</td><td>In Progress</td><td>2023-12-20</td><td></td><td></td><td></td><td>test1</td><td></td><td></td></tr></tbody></table>'
|
||||
'<table><thead><tr><th>Title</th><th>Status</th><th>Date</th><th>Number</th><th>Progress</th><th>MultiSelect</th><th>RichText</th><th>Link</th><th>Checkbox</th></tr></thead><tbody><tr><td>Task 1</td><td>TODO</td><td>2023-12-15</td><td>1</td><td>65</td><td>test1,test2</td><td><a href="https://google.com">test2</a></td><td>https://google.com</td><td>True</td></tr><tr><td>Task 2</td><td>In Progress</td><td>2023-12-20</td><td></td><td></td><td></td><td>test1</td><td></td><td></td></tr></tbody></table>'
|
||||
);
|
||||
const htmlAdapter = new HtmlAdapter(createJob(), provider);
|
||||
const target = await htmlAdapter.fromBlockSnapshot({
|
||||
|
||||
@@ -1684,7 +1684,7 @@ hhh
|
||||
const md = `\
|
||||
| Title | Status | Date | Number | Progress | MultiSelect | RichText | Link | Checkbox |
|
||||
| ------ | ----------- | ---------- | ------ | -------- | ----------- | --------------------------- | ------------------ | -------- |
|
||||
| Task 1 | TODO | 2023-12-15 | 1 | 65 | test1,test2 | [test2](https://google.com) | https://google.com | true |
|
||||
| Task 1 | TODO | 2023-12-15 | 1 | 65 | test1,test2 | [test2](https://google.com) | https://google.com | True |
|
||||
| Task 2 | In Progress | 2023-12-20 | | | | test1 | | |
|
||||
`;
|
||||
const mdAdapter = new MarkdownAdapter(createJob(), provider);
|
||||
|
||||
@@ -1417,7 +1417,7 @@ describe('snapshot to plain text', () => {
|
||||
const plainText = `\
|
||||
| Title | Status | Date | Number | Progress | MultiSelect | RichText | Link | Checkbox |
|
||||
| ------ | ----------- | ---------- | ------ | -------- | ----------- | ------------------------- | ------------------ | -------- |
|
||||
| Task 1 | TODO | 2023-12-15 | 1 | 65 | test1,test2 | test2: https://google.com | https://google.com | true |
|
||||
| Task 1 | TODO | 2023-12-15 | 1 | 65 | test1,test2 | test2: https://google.com | https://google.com | True |
|
||||
| Task 2 | In Progress | 2023-12-20 | | | | test1 | | |
|
||||
`;
|
||||
const plainTextAdapter = new PlainTextAdapter(createJob(), provider);
|
||||
|
||||
Reference in New Issue
Block a user