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:
Tom Moor
2023-02-21 11:43:28 -05:00
committed by GitHub
parent 0887219be6
commit eb42f8006d
9 changed files with 156 additions and 658 deletions

View File

@@ -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();