mirror of
https://github.com/mwilliamson/mammoth.js.git
synced 2024-12-08 15:14:29 +00:00
Use actual docx for testing single paragraph docx
This commit is contained in:
parent
9fdb851306
commit
57622e1584
@ -12,12 +12,10 @@ var createFakeDocxFile = testing.createFakeDocxFile;
|
||||
|
||||
describe('mammoth', function() {
|
||||
test('should convert docx containing one one paragraph to single p element', function() {
|
||||
var docxFile = createFakeDocxFile({
|
||||
"word/document.xml": testData("simple/word/document.xml")
|
||||
});
|
||||
var docxPath = path.join(__dirname, "test-data/single-paragraph.docx");
|
||||
var converter = new mammoth.Converter();
|
||||
return converter.convertToHtml(docxFile).then(function(result) {
|
||||
assert.equal("<p>Hello.</p>", result.html);
|
||||
return converter.convertToHtml(docxPath).then(function(result) {
|
||||
assert.equal("<p>Walking on imported air</p>", result.html);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
BIN
tests/test-data/single-paragraph.docx
Executable file
BIN
tests/test-data/single-paragraph.docx
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user