diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-04-02 17:56:07 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-04-02 17:56:07 +0100 |
| commit | 3433c9bfcc62c095d96af81df9a742e98b582715 (patch) | |
| tree | e497febb6cd2859294d074be319a6890d9b3a835 /tests | |
| parent | b0c2003c41431443412b451a679a4f1493feacc6 (diff) | |
Change document transforms to create copies of elements
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mammoth.tests.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 801bb02..ad71539 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -1,6 +1,7 @@ var assert = require("assert"); var path = require("path"); var fs = require("fs"); +var _ = require("underscore"); var mammoth = require("../"); var promises = require("../lib/promises"); @@ -156,8 +157,7 @@ describe('mammoth', function() { }); var options = { transformDocument: mammoth.transforms.paragraph(function(paragraph) { - paragraph.styleId = "Heading1"; - return paragraph; + return _.extend(paragraph, {styleId: "Heading1"}); }) }; return mammoth.convertToHtml({file: docxFile}, options).then(function(result) { |
