Add tests
This commit is contained in:
@ -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", () => {
|
||||
|
Reference in New Issue
Block a user