From 6a4cc9231f219c0047272c56081f881eab800d74 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 2 Apr 2016 17:14:31 +0100 Subject: Rename images.inline to images.imgElement --- tests/images.tests.js | 13 +++++++++++++ tests/mammoth.tests.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/images.tests.js (limited to 'tests') diff --git a/tests/images.tests.js b/tests/images.tests.js new file mode 100644 index 0000000..7aac5a2 --- /dev/null +++ b/tests/images.tests.js @@ -0,0 +1,13 @@ +var assert = require("assert"); + +var mammoth = require("../"); + +var testing = require("./testing"); +var test = testing.test; + + +describe('images', function() { + test('mammoth.images.inline() should be an alias of mammoth.images.imgElement()', function() { + assert.ok(mammoth.images.inline === mammoth.images.imgElement); + }); +}); diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 9d057f6..801bb02 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -174,7 +174,7 @@ describe('mammoth', function() { test('src of inline images can be changed', function() { var docxPath = path.join(__dirname, "test-data/tiny-picture.docx"); - var convertImage = mammoth.images.inline(function(element) { + var convertImage = mammoth.images.imgElement(function(element) { return element.read("base64").then(function(encodedImage) { return {src: encodedImage.substring(0, 2) + "," + element.contentType}; }); -- cgit v1.2.3