fix unit tests
This commit is contained in:
@@ -282,12 +282,13 @@ module.exports = CompileManager =
|
|||||||
}
|
}
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
wordcount: (project_id, user_id, file_name, image, callback = (error, pdfPositions) ->) ->
|
wordcount: (project_id, user_id, file_name, image, callback = (error, pdfPositions) ->) ->
|
||||||
logger.log project_id:project_id, user_id:user_id, file_name:file_name, image:image, "running wordcount"
|
logger.log project_id:project_id, user_id:user_id, file_name:file_name, image:image, "running wordcount"
|
||||||
file_path = "$COMPILE_DIR/" + file_name
|
file_path = "$COMPILE_DIR/" + file_name
|
||||||
command = [ "texcount", '-nocol', '-inc', file_path, "-out=" + file_path + ".wc"]
|
command = [ "texcount", '-nocol', '-inc', file_path, "-out=" + file_path + ".wc"]
|
||||||
directory = getCompileDir(project_id, user_id)
|
compileDir = getCompileDir(project_id, user_id)
|
||||||
timeout = 60 * 1000 # increased to allow for large projects
|
timeout = 60 * 1000
|
||||||
compileName = getCompileName(project_id, user_id)
|
compileName = getCompileName(project_id, user_id)
|
||||||
fse.ensureDir compileDir, (error) ->
|
fse.ensureDir compileDir, (error) ->
|
||||||
if error?
|
if error?
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ describe "CompileManager", ->
|
|||||||
['/opt/synctex', 'code', synctex_path, file_path, @line, @column],
|
['/opt/synctex', 'code', synctex_path, file_path, @line, @column],
|
||||||
"#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}",
|
"#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}",
|
||||||
@Settings.clsi.docker.image,
|
@Settings.clsi.docker.image,
|
||||||
10000,
|
60000,
|
||||||
{}
|
{}
|
||||||
).should.equal true
|
).should.equal true
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ describe "CompileManager", ->
|
|||||||
['/opt/synctex', "pdf", synctex_path, @page, @h, @v],
|
['/opt/synctex', "pdf", synctex_path, @page, @h, @v],
|
||||||
"#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}",
|
"#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}",
|
||||||
@Settings.clsi.docker.image,
|
@Settings.clsi.docker.image,
|
||||||
10000,
|
60000,
|
||||||
{}).should.equal true
|
{}).should.equal true
|
||||||
|
|
||||||
it "should call the callback with the parsed output", ->
|
it "should call the callback with the parsed output", ->
|
||||||
|
|||||||
Reference in New Issue
Block a user