From 869d5b2a725db8e41dc447227468c173d5292c18 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 27 Apr 2014 15:58:59 +0100 Subject: Remove mammoth.styleMapping --- tests/mammoth.tests.js | 4 ++-- tests/options-reader.tests.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index cc08565..0c9519e 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -35,12 +35,12 @@ describe('mammoth', function() { }); }); - test('style map can be expressed as array of styles', function() { + test('style map can be expressed as array of style mappings', function() { var docxFile = createFakeDocxFile({ "word/document.xml": testData("simple/word/document.xml") }); var options = { - styleMap: [mammoth.styleMapping("p => h1")] + styleMap: ["p => h1"] }; return mammoth.convertToHtml({file: docxFile}, options).then(function(result) { assert.equal("

Hello.

", result.value); diff --git a/tests/options-reader.tests.js b/tests/options-reader.tests.js index fcfa1bf..1beb314 100644 --- a/tests/options-reader.tests.js +++ b/tests/options-reader.tests.js @@ -1,6 +1,5 @@ var assert = require("assert"); -var styleMapping = require("../").styleMapping; var optionsReader = require("../lib/options-reader"); var standardOptions = optionsReader._standardOptions; var readOptions = optionsReader.readOptions; @@ -19,7 +18,7 @@ describe('readOptions', function() { var options = readOptions({ styleMap: "p.SectionTitle => h2" }); - assert.deepEqual(styleMapping("p.SectionTitle => h2"), options.styleMap[0]); + assert.deepEqual("p.SectionTitle => h2", options.styleMap[0]); assert.deepEqual(standardOptions.styleMap, options.styleMap.slice(1)); }); @@ -28,7 +27,7 @@ describe('readOptions', function() { styleMap: "p.SectionTitle => h2", includeDefaultStyleMap: false }); - assert.deepEqual([styleMapping("p.SectionTitle => h2")], options.styleMap); + assert.deepEqual(["p.SectionTitle => h2"], options.styleMap); }); }); -- cgit v1.2.3