mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-14 15:43:28 +00:00
add unit tests
This commit is contained in:
parent
63770bf390
commit
a684619bce
1 changed files with 19 additions and 1 deletions
|
@ -37,7 +37,10 @@ describe('LatexRunner', function() {
|
|||
done() {}
|
||||
})
|
||||
},
|
||||
'./CommandRunner': (this.CommandRunner = {})
|
||||
'./CommandRunner': (this.CommandRunner = {}),
|
||||
'fs': (this.fs = {
|
||||
writeFile: sinon.stub().callsArg(2)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -83,6 +86,21 @@ describe('LatexRunner', function() {
|
|||
)
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
it('should record the stdout and stderr', function () {
|
||||
this.fs.writeFile
|
||||
.calledWith(
|
||||
this.directory + '/' + 'output.stdout',
|
||||
"this is stdout"
|
||||
)
|
||||
.should.equal(true)
|
||||
this.fs.writeFile
|
||||
.calledWith(
|
||||
this.directory + '/' + 'output.stderr',
|
||||
"this is stderr"
|
||||
)
|
||||
.should.equal(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('with an .Rtex main file', function() {
|
||||
|
|
Loading…
Add table
Reference in a new issue