[web] Convert models and self-referential test files to ESM (#29521)

from overleaf/ar-models-es-conversion

GitOrigin-RevId: a92ab8342c0f3e23155eacc0570458fc910c3d71
This commit is contained in:
Andrew Rumble
2025-11-12 14:50:55 +00:00
committed by Copybot
parent 59aab0878d
commit 7c9fea64ac
202 changed files with 804 additions and 846 deletions
@@ -3,9 +3,8 @@ import sinon from 'sinon'
import tk from 'timekeeper'
import Errors from '../../../../app/src/Features/Errors/Errors.js'
import mongodb from 'mongodb-legacy'
import indirectlyImportModels from '../helpers/indirectlyImportModels.js'
import { Project } from '../../../../app/src/models/Project.mjs'
const { Project } = indirectlyImportModels(['Project'])
const { ObjectId } = mongodb
vi.mock('../../../../app/src/Features/Errors/Errors.js', () =>