mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02:00
Migrate from `settings-sharelatex` to `@overleaf/settings` GitOrigin-RevId: 9a298ba26382180c1351683c5fddc9004418c1e6
17 lines
483 B
JavaScript
17 lines
483 B
JavaScript
const Settings = require('@overleaf/settings')
|
|
|
|
async function run({ assertHasStatusCode, request }) {
|
|
const response = await request(`/project/${Settings.smokeTest.projectId}`)
|
|
|
|
assertHasStatusCode(response, 200)
|
|
|
|
const PROJECT_ID_REGEX = new RegExp(
|
|
`<meta name="ol-project_id" content="${Settings.smokeTest.projectId}">`
|
|
)
|
|
if (!PROJECT_ID_REGEX.test(response.body)) {
|
|
throw new Error('project page html does not have project_id')
|
|
}
|
|
}
|
|
|
|
module.exports = { run }
|