From 27c4e1390c8c28acb0b20d5a42255c0de0b33db5 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 12 Sep 2015 15:53:49 +0100 Subject: Test that null is returned when trying to read non-existent style map --- tests/docx/style-map.tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/docx/style-map.tests.js b/tests/docx/style-map.tests.js index 0c8ef23..55171f8 100644 --- a/tests/docx/style-map.tests.js +++ b/tests/docx/style-map.tests.js @@ -7,6 +7,14 @@ var styleMap = require("../../lib/docx/style-map"); var test = require("../testing").test; describe("style-map", function() { + test('reading embedded style map on document without embedded style map returns null', function() { + var zip = normalDocx(); + + return styleMap.readStyleMap(zip).then(function(contents) { + assert.equal(contents, null); + }); + }); + test('embedded style map can be read after being written', function() { var zip = normalDocx(); -- cgit v1.2.3