By adding typst as a dependency, test output generation and comparison could be done entirely in memory. This seems like a sensible thing to do, here are some of the pros and cons:
Pros
less I/O by doing in-memory reference to image comparison
increased performance
typst-test can be run without an external binary for typst, reducing error paths and improving usability
multiple tests can be parsed from a single test file with most of the config living in this file
avoids config files for configuring per test behavior
allows for separation of typst-test into a library crate and binary crate
opens the door for others to use the same underlying implementation for test running
Cons
fixes typst-test to a typst version for its default invocation
the default behavior of typst-test may diverge from the user's installed typst compiler on a version mismatch
massively increased dependency tree and binary size
increased complexity of the implementation
many implementations will have to be copied verbatim from typst-cli to ensure the same world behavior
By adding typst as a dependency, test output generation and comparison could be done entirely in memory. This seems like a sensible thing to do, here are some of the pros and cons:
Pros
Cons