pub trait Bundler {
// Required methods
fn get_name(&self) -> &str;
fn start_server(&self, test_dir: &Path) -> Result<(Child, String)>;
// Provided methods
fn get_path(&self) -> &str { ... }
fn react_version(&self) -> &str { ... }
fn render_type(&self) -> RenderType { ... }
fn has_hydration_event(&self) -> bool { ... }
fn prepare(&self, _template_dir: &Path) -> Result<()> { ... }
fn prepare_each(&self, _template_dir: &Path) -> Result<()> { ... }
fn max_init_update_timeout(&self, _module_count: usize) -> Duration { ... }
fn max_update_timeout(&self, _module_count: usize) -> Duration { ... }
}
Required Methods§
fn get_name(&self) -> &str
fn start_server(&self, test_dir: &Path) -> Result<(Child, String)>
Provided Methods§
fn get_path(&self) -> &str
fn react_version(&self) -> &str
fn render_type(&self) -> RenderType
Sourcefn has_hydration_event(&self) -> bool
fn has_hydration_event(&self) -> bool
There is a hydration done event emitted by client side JavaScript
fn prepare(&self, _template_dir: &Path) -> Result<()>
fn prepare_each(&self, _template_dir: &Path) -> Result<()>
Sourcefn max_init_update_timeout(&self, _module_count: usize) -> Duration
fn max_init_update_timeout(&self, _module_count: usize) -> Duration
The maximum amount of time to wait for HMR during the setup and warmup phase.
Sourcefn max_update_timeout(&self, _module_count: usize) -> Duration
fn max_update_timeout(&self, _module_count: usize) -> Duration
The maximum amount of time to wait for HMR during the actual benchmark. This is a lot shorter than the init timeout because we expect updates to generally happen quickly, and we don’t want to wait for a long time when an update is dropped.