mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 14:23:35 +00:00
fix up the aspell tests
This commit is contained in:
parent
72ce615641
commit
35254be989
2 changed files with 6 additions and 3 deletions
|
@ -10,6 +10,7 @@
|
|||
"dependencies": {
|
||||
"async": "0.1.22",
|
||||
"body-parser": "^1.12.0",
|
||||
"coffee-script": "^1.9.1",
|
||||
"express": "^4.12.1",
|
||||
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.0.0",
|
||||
"lru-cache": "^2.5.0",
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
sinon = require 'sinon'
|
||||
chai = require 'chai'
|
||||
should = chai.should()
|
||||
SandboxedModule = require('sandboxed-module')
|
||||
assert = require("chai").assert
|
||||
|
||||
describe "ASpell", ->
|
||||
beforeEach ->
|
||||
@ASpell = require("../../../app/js/ASpell")
|
||||
@ASpell = SandboxedModule.require "../../../app/js/ASpell", requires:{}
|
||||
|
||||
describe "a correctly spelled word", ->
|
||||
beforeEach (done) ->
|
||||
|
@ -44,11 +46,11 @@ describe "ASpell", ->
|
|||
|
||||
it "should return a blank array", ->
|
||||
@result.length.should.equal 1
|
||||
@result[0].suggestions.should.deep.equal []
|
||||
assert.deepEqual @result[0].suggestions, []
|
||||
|
||||
describe "when the request times out", ->
|
||||
beforeEach (done) ->
|
||||
words = ("abcdefg" for i in [0..1000000])
|
||||
words = ("abcdefg" for i in [0..1000])
|
||||
@ASpell.ASPELL_TIMEOUT = 100
|
||||
@start = new Date()
|
||||
@ASpell.checkWords "en", words, (error, @result) => done()
|
||||
|
|
Loading…
Reference in a new issue