mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 13:21:37 +02:00
[test/unit] misc: cleanup a pending interval
This commit is contained in:
@@ -32,7 +32,7 @@ try {
|
||||
}
|
||||
|
||||
// write the cache every 30 minutes
|
||||
setInterval(function() {
|
||||
const cacheDump = setInterval(function() {
|
||||
const dump = JSON.stringify(cache.dump())
|
||||
return fs.writeFile(cacheFsPathTmp, dump, function(err) {
|
||||
if (err != null) {
|
||||
@@ -186,3 +186,4 @@ ASpell.promises = promises
|
||||
module.exports = ASpell
|
||||
|
||||
var WorkerPool = new ASpellWorkerPool()
|
||||
module.exports.cacheDump = cacheDump
|
||||
|
||||
@@ -30,6 +30,9 @@ describe('ASpell', function() {
|
||||
}
|
||||
}))
|
||||
})
|
||||
afterEach(function () {
|
||||
clearInterval(this.ASpell.cacheDump)
|
||||
})
|
||||
|
||||
describe('a correctly spelled word', function() {
|
||||
beforeEach(function(done) {
|
||||
|
||||
Reference in New Issue
Block a user