Files
overleaf-cep/services/clsi/test/acceptance/js/DeleteOldFilesTest.js
Andrew Rumble cd7da983d1 Merge pull request #30232 from overleaf/ar/convert-clsi-to-es-modules
[clsi] convert to ES modules

GitOrigin-RevId: fb7fa52cc8f678ee31be352e62a5dff95e88008b
2026-01-22 09:06:23 +00:00

44 lines
1.0 KiB
JavaScript

import Client from './helpers/Client.js'
import ClsiApp from './helpers/ClsiApp.js'
describe('Deleting Old Files', function () {
before(async function () {
this.request = {
resources: [
{
path: 'main.tex',
content: `\
\\documentclass{article}
\\begin{document}
Hello world
\\end{document}\
`,
},
],
}
await ClsiApp.ensureRunning()
})
describe('on first run', function () {
before(async function () {
this.project_id = Client.randomId()
this.body = await Client.compile(this.project_id, this.request)
})
it('should return a success status', function () {
this.body.compile.status.should.equal('success')
})
describe('after file has been deleted', function () {
before(async function () {
this.request.resources = []
this.body = await Client.compile(this.project_id, this.request)
})
it('should return a failure status', function () {
this.body.compile.status.should.equal('failure')
})
})
})
})