diff options
| -rw-r--r-- | tests/docx/style-map.tests.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/docx/style-map.tests.js b/tests/docx/style-map.tests.js index 34dab8d..0c8ef23 100644 --- a/tests/docx/style-map.tests.js +++ b/tests/docx/style-map.tests.js @@ -30,12 +30,6 @@ describe("style-map", function() { test('embedded style map is referenced in relationships', function() { var zip = normalDocx(); - var expectedRelationshipsXml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + - '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + - '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Target="settings.xml"/>' + - '<Relationship Id="rMammothStyleMap" Type="http://schemas.zwobble.org/mammoth/style-map" Target="/mammoth/style-map"/>' + - '</Relationships>'; - return styleMap.writeStyleMap(zip, "p => h1").then(function() { return zip.read("word/_rels/document.xml.rels", "utf8").then(function(contents) { assert.equal(contents, expectedRelationshipsXml); @@ -46,12 +40,6 @@ describe("style-map", function() { test('re-embedding style map replaces original', function() { var zip = normalDocx(); - var expectedRelationshipsXml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + - '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + - '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Target="settings.xml"/>' + - '<Relationship Id="rMammothStyleMap" Type="http://schemas.zwobble.org/mammoth/style-map" Target="/mammoth/style-map"/>' + - '</Relationships>'; - return styleMap.writeStyleMap(zip, "p => h1").then(function() { return styleMap.writeStyleMap(zip, "p => h2"); }).then(function() { @@ -89,6 +77,12 @@ describe("style-map", function() { }); +var expectedRelationshipsXml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + + '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Target="settings.xml"/>' + + '<Relationship Id="rMammothStyleMap" Type="http://schemas.zwobble.org/mammoth/style-map" Target="/mammoth/style-map"/>' + + '</Relationships>'; + var expectedContentTypesXml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">' + '<Default Extension="png" ContentType="image/png"/>' + |
