use derive_more::Debug;
use rspack_plugin_rstest::RstestPluginOptions;
#[derive(Debug)]
#[napi(object, object_to_js = false)]
pub struct RawRstestPluginOptions {
pub inject_module_path_name: bool,
pub import_meta_path_name: bool,
pub hoist_mock_module: bool,
pub manual_mock_root: String,
pub preserve_new_url: Option<Vec<String>>,
}
impl From<RawRstestPluginOptions> for RstestPluginOptions {
fn from(value: RawRstestPluginOptions) -> Self {
Self {
module_path_name: value.inject_module_path_name,
hoist_mock_module: value.hoist_mock_module,
import_meta_path_name: value.import_meta_path_name,
manual_mock_root: value.manual_mock_root,
preserve_new_url: value.preserve_new_url.unwrap_or_default(),
}
}
}