summaryrefslogtreecommitdiff
path: root/tests/src/world.rs
diff options
context:
space:
mode:
authorMichael Färber <01mf02@gmail.com>2024-12-20 10:48:17 +0100
committerGitHub <noreply@github.com>2024-12-20 09:48:17 +0000
commitdf4e6715cf31817878d73286d2d4b1ea1b7afdbb (patch)
tree6265db40fc7907454a608120f0b3a20cfce825e1 /tests/src/world.rs
parentdb06dbf9763d6c610d1f7a267597ecdad309048a (diff)
HTML tests (#5594)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests/src/world.rs')
-rw-r--r--tests/src/world.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/src/world.rs b/tests/src/world.rs
index f5e49ba6..a08f1efa 100644
--- a/tests/src/world.rs
+++ b/tests/src/world.rs
@@ -19,7 +19,7 @@ use typst::syntax::{FileId, Source, Span};
use typst::text::{Font, FontBook, TextElem, TextSize};
use typst::utils::{singleton, LazyHash};
use typst::visualize::Color;
-use typst::{Library, World};
+use typst::{Feature, Library, World};
/// A world that provides access to the tests environment.
#[derive(Clone)]
@@ -180,7 +180,9 @@ fn library() -> Library {
// Set page width to 120pt with 10pt margins, so that the inner page is
// exactly 100pt wide. Page height is unbounded and font size is 10pt so
// that it multiplies to nice round numbers.
- let mut lib = Library::default();
+ let mut lib = Library::builder()
+ .with_features([Feature::Html].into_iter().collect())
+ .build();
// Hook up helpers into the global scope.
lib.global.scope_mut().define_func::<test>();