Add tests

This commit is contained in:
Dolan Miu
2023-03-31 17:16:05 +01:00
parent c3a617fefd
commit 10c866bdea

View File

@ -86,6 +86,29 @@ describe("paragraph-split-inject", () => {
),
).to.throw();
});
it("should continue if text run doesn't have text", () => {
const output = findRunElementIndexWithToken(
{
name: "w:p",
type: "element",
elements: [
{
name: "w:r",
type: "element",
elements: [
{
name: "w:t",
type: "element",
},
],
},
],
},
"hello",
);
expect(output).to.deep.equal(0);
});
});
describe("splitRunElement", () => {