mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-29 06:13:51 +00:00
update tests
This commit is contained in:
parent
ed5acc9f93
commit
a26971ba2e
1 changed files with 6 additions and 4 deletions
|
@ -202,8 +202,8 @@ describe "CompileManager", ->
|
|||
|
||||
describe "wordcount", ->
|
||||
beforeEach ->
|
||||
@CommandRunner.run = sinon.stub().callsArg(5)
|
||||
@fs.readFileSync = sinon.stub().returns @stdout = "Encoding: ascii\nWords in text: 2"
|
||||
@CommandRunner.run = sinon.stub().callsArg(6)
|
||||
@fs.readFile = sinon.stub().callsArgWith(2, null, @stdout = "Encoding: ascii\nWords in text: 2")
|
||||
@callback = sinon.stub()
|
||||
|
||||
@project_id = "project-id-123"
|
||||
|
@ -217,10 +217,10 @@ describe "CompileManager", ->
|
|||
it "should run the texcount command", ->
|
||||
@directory = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}"
|
||||
@file_path = "$COMPILE_DIR/#{@file_name}"
|
||||
@command =[ "texcount", "-inc", @file_path, "-out=" + @file_path + ".wc"]
|
||||
@command =[ "texcount", "-nocol", "-inc", @file_path, "-out=" + @file_path + ".wc"]
|
||||
|
||||
@CommandRunner.run
|
||||
.calledWith("#{@project_id}-#{@user_id}", @command, @directory, @image, @timeout)
|
||||
.calledWith("#{@project_id}-#{@user_id}", @command, @directory, @image, @timeout, {})
|
||||
.should.equal true
|
||||
|
||||
it "should call the callback with the parsed output", ->
|
||||
|
@ -234,5 +234,7 @@ describe "CompileManager", ->
|
|||
elements: 0
|
||||
mathInline: 0
|
||||
mathDisplay: 0
|
||||
errors: 0
|
||||
messages: ""
|
||||
})
|
||||
.should.equal true
|
||||
|
|
Loading…
Reference in a new issue