aboutsummaryrefslogtreecommitdiff
path: root/tests/buffer-tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/buffer-tests.js')
-rw-r--r--tests/buffer-tests.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/buffer-tests.js b/tests/buffer-tests.js
deleted file mode 100644
index 3b4a6c1..0000000
--- a/tests/buffer-tests.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var assert = require("assert");
-var test = require("./testing").test;
-
-var fs = require("fs");
-var path = require("path");
-
-var mammoth = require("../lib");
-
-describe("buffer-tests", function() {
- test('should convert docx as Buffer to one HTML paragraph', function() {
- var docxPath = path.join(__dirname, "test-data/single-paragraph.docx");
- var buffer = fs.readFileSync(docxPath);
- return mammoth.convertToHtml({buffer: buffer}).then(function(result) {
- assert.equal(result.value, "<p>Walking on imported air</p>");
- assert.deepEqual(result.messages, []);
- });
- });
-
- test('should convert docx as Buffer to plain text', function() {
- var docxPath = path.join(__dirname, "test-data/single-paragraph.docx");
- var buffer = fs.readFileSync(docxPath);
- return mammoth.extractRawText({buffer: buffer}).then(function(result) {
- assert.equal(result.value, "Walking on imported air\n\n");
- assert.deepEqual(result.messages, []);
- });
- });
-});