Turn back on no-null-keyword. Use empty object instead of null
to signal to the xml
library that an empty element should be produced. Update the related tests.
Related to #306
This commit is contained in:
@ -156,12 +156,12 @@ describe("Image", () => {
|
||||
},
|
||||
},
|
||||
{
|
||||
"a:srcRect": null,
|
||||
"a:srcRect": {},
|
||||
},
|
||||
{
|
||||
"a:stretch": [
|
||||
{
|
||||
"a:fillRect": null,
|
||||
"a:fillRect": {},
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -202,7 +202,7 @@ describe("Image", () => {
|
||||
},
|
||||
},
|
||||
{
|
||||
"a:avLst": null,
|
||||
"a:avLst": {},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -471,7 +471,7 @@ describe("Paragraph", () => {
|
||||
{
|
||||
"w:pPr": [
|
||||
{
|
||||
"w:pageBreakBefore": null,
|
||||
"w:pageBreakBefore": {},
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -625,7 +625,7 @@ describe("Paragraph", () => {
|
||||
paragraph.keepLines();
|
||||
const tree = new Formatter().format(paragraph);
|
||||
expect(tree).to.deep.equal({
|
||||
"w:p": [{ "w:pPr": [{ "w:keepLines": null }] }],
|
||||
"w:p": [{ "w:pPr": [{ "w:keepLines": {} }] }],
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -635,7 +635,7 @@ describe("Paragraph", () => {
|
||||
paragraph.keepNext();
|
||||
const tree = new Formatter().format(paragraph);
|
||||
expect(tree).to.deep.equal({
|
||||
"w:p": [{ "w:pPr": [{ "w:keepNext": null }] }],
|
||||
"w:p": [{ "w:pPr": [{ "w:keepNext": {} }] }],
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -645,7 +645,7 @@ describe("Paragraph", () => {
|
||||
paragraph.bidirectional();
|
||||
const tree = new Formatter().format(paragraph);
|
||||
expect(tree).to.deep.equal({
|
||||
"w:p": [{ "w:pPr": [{ "w:bidi": null }] }],
|
||||
"w:p": [{ "w:pPr": [{ "w:bidi": {} }] }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user