aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-04-02 17:14:31 +0100
committerMichael Williamson <mike@zwobble.org>2016-04-02 17:14:31 +0100
commit6a4cc9231f219c0047272c56081f881eab800d74 (patch)
treea9631dfa47eb3db6a7060255e8b3042f3255756f /tests
parent3afd698984f9ec3fcb9b16e5d6c12ea4a23dfb53 (diff)
Rename images.inline to images.imgElement
Diffstat (limited to 'tests')
-rw-r--r--tests/images.tests.js13
-rw-r--r--tests/mammoth.tests.js2
2 files changed, 14 insertions, 1 deletions
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};
});