diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-08-18 12:51:51 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-08-18 12:51:51 +0100 |
| commit | 275b87161b64d0ee2932acc488611d46f280ae75 (patch) | |
| tree | 51748726cde9fb08aafa2560ee18eca3e3a966f7 /tests/buffer-tests.js | |
| parent | 86564e37ae9433d9678e0c00c66e342afd8884b0 (diff) | |
Rearrange buffer tests
Diffstat (limited to 'tests/buffer-tests.js')
| -rw-r--r-- | tests/buffer-tests.js | 27 |
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, []); - }); - }); -}); |
