Skip to content

Commit 2d4f32b

Browse files
shusann01116syphar
authored andcommitted
Revise test code to override config instead of provide a large array
1 parent 74ddf9f commit 2d4f32b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/web/source.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,10 +741,14 @@ mod tests {
741741
#[test]
742742
fn large_file_test() {
743743
wrapper(|env| {
744+
env.override_config(|config| {
745+
config.max_file_size = 1;
746+
config.max_file_size_html = 1;
747+
});
744748
env.fake_release()
745749
.name("fake")
746750
.version("0.1.0")
747-
.source_file("large_file.rs", &[0; 50 * 1024 * 1024 + 1]) // 50MB + 1 byte
751+
.source_file("large_file.rs", b"some_random_content")
748752
.create()?;
749753

750754
let web = env.frontend();

0 commit comments

Comments
 (0)