diff --git a/lib/components/document/test/Cell.test.ts b/lib/components/document/test/Cell.test.ts
index 132920d..1a1b79b 100644
--- a/lib/components/document/test/Cell.test.ts
+++ b/lib/components/document/test/Cell.test.ts
@@ -188,3 +188,50 @@ describe('Cell - with colspan', () => {
expect(originalCellWidths).toEqual(newCellWidths);
});
});
+
+describe('Cell - with borders', () => {
+ const tableNode = create(`
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `);
+
+ it('cell width', async () => {
+ const fromNode = Table.fromNode(tableNode, emptyContext);
+ const toNode = await fromNode.toNode([]);
+
+ const originalBorder = evaluateXPathToFirstNode(
+ `./descendant::Q{${NamespaceUri.w}}tcBorders`,
+ tableNode
+ );
+ const newBorder = evaluateXPathToFirstNode(
+ `./descendant::Q{${NamespaceUri.w}}tcBorders`,
+ toNode
+ );
+
+ expect(originalBorder?.getAttributeNS(NamespaceUri.w, 'val')).toEqual(
+ newBorder?.getAttributeNS(NamespaceUri.w, 'val')
+ );
+ expect(originalBorder?.getAttributeNS(NamespaceUri.w, 'sz')).toEqual(
+ newBorder?.getAttributeNS(NamespaceUri.w, 'sz')
+ );
+ expect(originalBorder?.getAttributeNS(NamespaceUri.w, 'space')).toEqual(
+ newBorder?.getAttributeNS(NamespaceUri.w, 'space')
+ );
+ expect(originalBorder?.getAttributeNS(NamespaceUri.w, 'color')).toEqual(
+ newBorder?.getAttributeNS(NamespaceUri.w, 'color')
+ );
+ });
+});
diff --git a/lib/components/document/test/Hyperlink.test.ts b/lib/components/document/test/Hyperlink.test.ts
index 754c346..45914be 100644
--- a/lib/components/document/test/Hyperlink.test.ts
+++ b/lib/components/document/test/Hyperlink.test.ts
@@ -19,28 +19,28 @@ const emptyContext: ComponentContext = {
describe('Hyperlink', () => {
const hyperlink = Hyperlink.fromNode(
create(`
-
-
- Link
-
-
-
- This is a new paragraph
-
-
-
-
- This is removed paragraph
-
-
-
- `),
+
+
+ Link
+
+
+
+ This is a new paragraph
+
+
+
+
+ This is removed paragraph
+
+
+ `),
emptyContext
);
it('parses props correctly', () => {
expect(hyperlink.props.anchor).toBe('chapter1');
expect(hyperlink.props.tooltip).toBe('link');
+ expect(hyperlink.props.relationshipId).toBe('rId1');
});
it('parses children correctly', () => {