-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
In multi-view mode implicitView is not needed, but it manages to sneak itself in anyway. For example, initializeEngineUi will initialize it. That makes testing multi-view awkward, where a test can't test pure multi-view, but has to account for an implicitView side-loading itself into the page. We should reshape the API such that you can bootstrap in any mode you want.
To tell us how this might work, here's a message from @mdebbar from a chat thread:
I want us to move to a world where
implicitViewis not created by default. Instead, it's only created when required (and we should minimize the situations that require an implicit view).So tests ideally should all run without creating an implicit view. The few tests that absolutely need an implicit view can call
ensureImplicitViewInitialized().In such a world, the initialization sequence for tests shouldn't create the implicit view.
Tests do:
await bootstrapAndRun(); // no implicit viewAnd tests that need an implicit view:
await bootstrapAndRun(); // no implicit view ensureImplicitViewInitialized(); // add implicit view