Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Selman <danscode@selman.org>
  • Loading branch information
dselman committed Sep 25, 2023
1 parent d9afbe8 commit ea28777
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/markdown-transform/test/transform.js
Expand Up @@ -237,6 +237,11 @@ describe('#sample', () => {
result.$class.should.equal(`${CommonMarkModel.NAMESPACE}.Document`);
});

it('pdf -> docx', async () => {
const result = await transform(samplePdf, 'pdf', ['docx'], {}, {});
result.should.not.be.null;
});

it('pdf -> ciceromark (verbose)', async () => {
const result = await transform(samplePdf, 'pdf', ['ciceromark'], {}, {verbose: true});
result.$class.should.equal(`${CommonMarkModel.NAMESPACE}.Document`);
Expand All @@ -255,13 +260,22 @@ describe('#sample', () => {
const result = await transform(sampleDocx, 'docx', ['ciceromark'], {}, {});
result.$class.should.equal(`${CommonMarkModel.NAMESPACE}.Document`);
});

it('docx -> wordml', async () => {
const result = await transform(sampleDocx, 'docx', ['wordml'], {}, {});
result.startsWith('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>').should.be.true;
});
});

describe('#html', () => {
it('html -> ciceromark', async () => {
const result = await transform(sampleHtml, 'html', ['ciceromark'], {}, {});
result.$class.should.equal(`${CommonMarkModel.NAMESPACE}.Document`);
});
it('html -> docx', async () => {
const result = await transform(sampleHtml, 'html', ['docx'], {}, {});
result.should.not.be.null;
});
});

});
Expand Down

0 comments on commit ea28777

Please sign in to comment.