Skip to content

Commit 770e8f7

Browse files
committed
Use runSync
1 parent 3dc4c9a commit 770e8f7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const processor = unified().use(slateToRemark).use(stringify, {
4545
incrementListMarker: false,
4646
});
4747

48-
const tree = await processor.run({
48+
const tree = processor.runSync({
4949
type: "root",
5050
children: value,
5151
});

src/index.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ describe("e2e", () => {
1111
.use(remarkToSlate);
1212
const toRemarkProcessor = unified().use(slateToRemark).use(stringify);
1313

14-
it("plain text", async () => {
14+
it("plain text", () => {
1515
const slateNodes = toSlateProcessor.processSync(
1616
fs.readFileSync(path.join(__dirname, "../fixture/plain-text.md"))
1717
).result;
1818
expect(slateNodes).toMatchSnapshot();
1919

20-
const mdastTree = await toRemarkProcessor.run({
20+
const mdastTree = toRemarkProcessor.runSync({
2121
type: "root",
2222
children: slateNodes,
2323
});
@@ -27,13 +27,13 @@ describe("e2e", () => {
2727
expect(text).toMatchSnapshot();
2828
});
2929

30-
it("headings", async () => {
30+
it("headings", () => {
3131
const slateNodes = toSlateProcessor.processSync(
3232
fs.readFileSync(path.join(__dirname, "../fixture/headings.md"))
3333
).result;
3434
expect(slateNodes).toMatchSnapshot();
3535

36-
const mdastTree = await toRemarkProcessor.run({
36+
const mdastTree = toRemarkProcessor.runSync({
3737
type: "root",
3838
children: slateNodes,
3939
});
@@ -43,13 +43,13 @@ describe("e2e", () => {
4343
expect(text).toMatchSnapshot();
4444
});
4545

46-
it("article", async () => {
46+
it("article", () => {
4747
const slateNodes = toSlateProcessor.processSync(
4848
fs.readFileSync(path.join(__dirname, "../fixture/article.md"))
4949
).result;
5050
expect(slateNodes).toMatchSnapshot();
5151

52-
const mdastTree = await toRemarkProcessor.run({
52+
const mdastTree = toRemarkProcessor.runSync({
5353
type: "root",
5454
children: slateNodes,
5555
});

0 commit comments

Comments
 (0)