mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
added unit tests
This commit is contained in:
@@ -159,6 +159,28 @@ describe "ClsiManager", ->
|
||||
}]
|
||||
)
|
||||
|
||||
|
||||
describe "when root doc override is valid", ->
|
||||
beforeEach (done) ->
|
||||
@ClsiManager._buildRequest @project_id, {rootDoc_id:"mock-doc-id-2"}, (error, request) =>
|
||||
@request = request
|
||||
done()
|
||||
|
||||
it "should change root path", ->
|
||||
@request.compile.rootResourcePath.should.equal "chapters/chapter1.tex"
|
||||
|
||||
|
||||
describe "when root doc override is invalid", ->
|
||||
beforeEach (done) ->
|
||||
@ClsiManager._buildRequest @project_id, {rootDoc_id:"invalid-id"}, (error, request) =>
|
||||
@request = request
|
||||
done()
|
||||
|
||||
it "should fallback to default root doc", ->
|
||||
@request.compile.rootResourcePath.should.equal "main.tex"
|
||||
|
||||
|
||||
|
||||
describe "when the project has an invalid compiler", ->
|
||||
beforeEach (done) ->
|
||||
@project.compiler = "context"
|
||||
|
||||
Reference in New Issue
Block a user