mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
test that Aspell is killed by timeout
This commit is contained in:
@@ -51,10 +51,11 @@ describe "ASpell", ->
|
|||||||
describe "when the request times out", ->
|
describe "when the request times out", ->
|
||||||
beforeEach (done) ->
|
beforeEach (done) ->
|
||||||
words = ("abcdefg" for i in [0..1000])
|
words = ("abcdefg" for i in [0..1000])
|
||||||
@ASpell.ASPELL_TIMEOUT = 100
|
@ASpell.ASPELL_TIMEOUT = 1
|
||||||
@start = new Date()
|
@start = Date.now()
|
||||||
@ASpell.checkWords "en", words, (error, @result) => done()
|
@ASpell.checkWords "en", words, (error, @result) => done()
|
||||||
|
|
||||||
it "should return in reasonable time", (done) ->
|
it "should return in reasonable time", (done) ->
|
||||||
|
delta = Date.now()-@start
|
||||||
|
delta.should.be.below(@ASpell.ASPELL_TIMEOUT + 10)
|
||||||
done()
|
done()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user