Allow ESM OL modules to be loaded

Lots of changes to async/await required to allow this. We have to make
some changes to handle the fact that modules are loaded async in stages
rather than sync (so we can't control when top-level functionality is
run in a fine grained way)

GitOrigin-RevId: 0127b15bfc4f228a267df3af8519c675e900654e
This commit is contained in:
andrew rumble
2024-09-25 17:22:33 +01:00
committed by Copybot
parent 828dcfd228
commit 9c2bbb39ad
7 changed files with 112 additions and 71 deletions
@@ -140,6 +140,9 @@ describe('ProjectDeleter', function () {
}
this.ProjectDeleter = SandboxedModule.require(modulePath, {
requires: {
'../../infrastructure/Modules': {
promises: { hooks: { fire: sinon.stub().resolves() } },
},
'../../infrastructure/Features': this.Features,
'../Editor/EditorRealTimeController': this.EditorRealTimeController,
'../../models/Project': { Project },