From a0dcb5cbc43ea09e3bf08afcb7620105c8794ec2 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 12 Sep 2015 14:07:07 +0100 Subject: Extract duplicated expectedRelationshipsXml --- tests/docx/style-map.tests.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'tests') 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 = '' + - '' + - '' + - '' + - ''; - 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 = '' + - '' + - '' + - '' + - ''; - 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 = '' + + '' + + '' + + '' + + ''; + var expectedContentTypesXml = '' + '' + '' + -- cgit v1.2.3