chore: Remove 16+ unused dependencies (#4910)
* chore: Remove no-longer used webpack loaders * chore: Remove migration of markdown from Slate documents (2y old) * chore: Remove more unused deps * chore: Remove explicit core-js dep * Remove more unused dependencies * test
This commit is contained in:
@@ -37,131 +37,6 @@ paragraph 2`,
|
||||
});
|
||||
});
|
||||
|
||||
describe("#migrateVersion", () => {
|
||||
test("should maintain empty paragraph under headings", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `# Heading
|
||||
|
||||
paragraph`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`# Heading
|
||||
|
||||
paragraph`);
|
||||
});
|
||||
|
||||
test("should add breaks under headings with extra paragraphs", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `# Heading
|
||||
|
||||
|
||||
paragraph`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`# Heading
|
||||
|
||||
|
||||
\\
|
||||
paragraph`);
|
||||
});
|
||||
|
||||
test("should add breaks between paragraphs", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `paragraph
|
||||
|
||||
paragraph`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`paragraph
|
||||
|
||||
\\
|
||||
paragraph`);
|
||||
});
|
||||
|
||||
test("should add breaks for multiple empty paragraphs", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `paragraph
|
||||
|
||||
|
||||
paragraph`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`paragraph
|
||||
|
||||
\\
|
||||
\\
|
||||
paragraph`);
|
||||
});
|
||||
|
||||
test("should add breaks with non-latin characters", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `除。
|
||||
|
||||
通`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`除。
|
||||
|
||||
\\
|
||||
通`);
|
||||
});
|
||||
|
||||
test("should update task list formatting", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `[ ] list item
|
||||
`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`- [ ] list item
|
||||
`);
|
||||
});
|
||||
|
||||
test("should update task list with multiple items", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `[ ] list item
|
||||
[ ] list item 2
|
||||
`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`- [ ] list item
|
||||
- [ ] list item 2
|
||||
`);
|
||||
});
|
||||
|
||||
test("should update checked task list formatting", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `[x] list item
|
||||
`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`- [x] list item
|
||||
`);
|
||||
});
|
||||
|
||||
test("should update nested task list formatting", async () => {
|
||||
const document = await buildDocument({
|
||||
version: 1,
|
||||
text: `[x] list item
|
||||
[ ] list item
|
||||
[x] list item
|
||||
`,
|
||||
});
|
||||
await document.migrateVersion();
|
||||
expect(document.text).toBe(`- [x] list item
|
||||
- [ ] list item
|
||||
- [x] list item
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#delete", () => {
|
||||
test("should soft delete and set last modified", async () => {
|
||||
const document = await buildDocument();
|
||||
|
||||
Reference in New Issue
Block a user