diff options
Diffstat (limited to 'tests/mammoth.tests.js')
| -rw-r--r-- | tests/mammoth.tests.js | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 2fb7199..e963257 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -1,11 +1,13 @@ var assert = require("assert"); -var path = require("path"); -var fs = require("fs"); + var mammoth = require("../") -var q = require("q"); -var test = require("./testing").test; var styles = require("../lib/styles"); +var testing = require("./testing"); +var test = testing.test; +var testData = testing.testData; +var createFakeDocxFile = testing.createFakeDocxFile; + describe('mammoth', function() { test('should convert docx containing one one paragraph to single p element', function() { @@ -30,18 +32,3 @@ describe('mammoth', function() { }); }); }) - -function createFakeDocxFile(files) { - function read(path) { - return files[path]; - } - - return { - read: read - }; -} - -function testData(testDataPath) { - var fullPath = path.join(__dirname, "test-data", testDataPath); - return q.nfcall(fs.readFile, fullPath, "utf-8"); -} |
