-
Notifications
You must be signed in to change notification settings - Fork 399
/
lib.rs
32 lines (30 loc) · 1.12 KB
/
lib.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use schemars::JsonSchema;
use serde::Deserialize;
#[derive(Deserialize, JsonSchema, Default)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
#[allow(clippy::struct_excessive_bools, clippy::pub_underscore_fields)]
pub struct TestConfig {
#[serde(default)]
pub config: rolldown_common::BundlerOptions,
#[serde(default = "true_by_default")]
/// If `false`, the compiled artifacts won't be executed, but `_test.mjs` will be still executed if exists.
pub expect_executed: bool,
#[serde(default)]
/// If `true`, the fixture are expected to fail to compile/build.
pub expect_error: bool,
#[serde(default, rename = "_comment")]
/// A workaround for writing comments in JSON.
pub _comment: String,
#[serde(default)]
/// If `true`, the fixture output stats will be snapshot.
pub snapshot_output_stats: bool,
#[serde(default)]
/// If `true`, the sourcemap visualizer will be snapshot.
pub visualize_sourcemap: bool,
#[serde(default = "true_by_default")]
/// Default is `true`. If `false`, the runtime module will not be hidden.
pub hidden_runtime_module: bool,
}
fn true_by_default() -> bool {
true
}