Convert tests to ESM

GitOrigin-RevId: 20585e01dee90e691476a0d47fd5c63b0412e4a6
This commit is contained in:
Andrew Rumble
2025-10-23 08:06:15 +00:00
committed by Copybot
parent f02f6475ac
commit b7c883ac38
37 changed files with 9076 additions and 8299 deletions
@@ -5,10 +5,13 @@ import Errors from '../../../../app/src/Features/Errors/Errors.js'
const ObjectId = mongodb.ObjectId
const MODULE_PATH = new URL(
'../../../../app/src/Features/Project/ProjectListController',
import.meta.url
).pathname
const MODULE_PATH = `${import.meta.dirname}/../../../../app/src/Features/Project/ProjectListController`
// Mock AnalyticsManager as it isn't used in these tests but causes the User model to be imported
// TODO: remove this once all models are ESM and this kind of mocking is no longer necessary
vi.mock('../../../../app/src/Features/Analytics/AnalyticsManager.js', () => {
return {}
})
describe('ProjectListController', function () {
beforeEach(async function (ctx) {