From 841d7c1c60984c55bbc7e28461fd7d999b206154 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 14 Dec 2013 18:13:01 +0000 Subject: Remove redundant defaultParagraphStyle option --- tests/mammoth.tests.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'tests/mammoth.tests.js') diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 3a7eabb..a7385ca 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -6,6 +6,7 @@ var q = require("q"); var mammoth = require("../") var htmlPaths = require("../lib/html-paths"); +var documentMatchers = require("../lib/document-matchers"); var testing = require("./testing"); var test = testing.test; @@ -43,7 +44,12 @@ describe('mammoth', function() { "word/document.xml": testData("simple/word/document.xml") }); var converter = new mammoth.Converter({ - defaultParagraphStyle: htmlPaths.topLevelElement("h1") + styleMap: [ + { + from: documentMatchers.paragraph(), + to: htmlPaths.topLevelElement("h1") + } + ] }); return converter.convertToHtml({file: docxFile}).then(function(result) { assert.equal("

Hello.

", result.value); @@ -55,7 +61,12 @@ describe('mammoth', function() { "word/document.xml": testData("simple/word/document.xml") }); var options = { - defaultParagraphStyle: htmlPaths.topLevelElement("h1") + styleMap: [ + { + from: documentMatchers.paragraph(), + to: htmlPaths.topLevelElement("h1") + } + ] }; return mammoth.convertToHtml({file: docxFile}, options).then(function(result) { assert.equal("

Hello.

", result.value); -- cgit v1.2.3