Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed May 19, 2024
1 parent 2c42cdc commit 4ebcb00
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/models/Document.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EmptyResultError } from "sequelize";
import slugify from "@shared/utils/slugify";
import { parser } from "@server/editor";
import Document from "@server/models/Document";
import {
buildDocument,
Expand Down Expand Up @@ -249,10 +250,14 @@ describe("tasks", () => {
const tasks = document.tasks;
expect(tasks.completed).toBe(1);
expect(tasks.total).toBe(2);
document.text = `
document.content = parser
.parse(
`
- [x] list item
- [ ] list item
- [ ] list item`;
- [ ] list item`
)
?.toJSON();
await document.save();
const newTasks = document.tasks;
expect(newTasks.completed).toBe(1);
Expand Down

0 comments on commit 4ebcb00

Please sign in to comment.