mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #34145 from overleaf/ds-download-html-using-pandoc-clsi-1
[CLSI] Download as HTML feature GitOrigin-RevId: 374101c1f957a00eda423a6be0363c08b5de7a95
This commit is contained in:
committed by
Copybot
parent
0501586743
commit
fc31a88767
@@ -592,6 +592,37 @@ describe('ConversionController', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('with conversionType=html', function () {
|
||||
beforeEach(async function (ctx) {
|
||||
ctx.req.query = { type: 'html' }
|
||||
ctx.fs.stat.resolves(ctx.documentStat)
|
||||
|
||||
await ctx.ConversionController.convertProjectToDocument(
|
||||
ctx.req,
|
||||
ctx.res,
|
||||
sinon.stub()
|
||||
)
|
||||
})
|
||||
|
||||
it('should call convertLaTeXToDocumentInDirWithLock with type=html', function (ctx) {
|
||||
sinon.assert.calledWith(
|
||||
ctx.ConversionManager.promises.convertLaTeXToDocumentInDirWithLock,
|
||||
sinon.match(
|
||||
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
|
||||
),
|
||||
sinon.match(
|
||||
/^\/compiles\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
|
||||
),
|
||||
'main.tex',
|
||||
'html'
|
||||
)
|
||||
})
|
||||
|
||||
it('should set the attachment filename with .zip extension', function (ctx) {
|
||||
sinon.assert.calledWith(ctx.res.attachment, 'output.zip')
|
||||
})
|
||||
})
|
||||
|
||||
describe('when conversion fails', function () {
|
||||
beforeEach(async function (ctx) {
|
||||
ctx.next = sinon.stub()
|
||||
|
||||
Reference in New Issue
Block a user