diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-04-13 10:39:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 08:39:45 +0000 |
| commit | 020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch) | |
| tree | c0027ad22046e2726c22298461327823d6b88d53 /tools/test-helper/README.md | |
| parent | 72dd79210602ecc799726fc096b078afbb47f299 (diff) | |
Better test runner (#3922)
Diffstat (limited to 'tools/test-helper/README.md')
| -rw-r--r-- | tools/test-helper/README.md | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/tools/test-helper/README.md b/tools/test-helper/README.md index 0b10c454..f95b8d73 100644 --- a/tools/test-helper/README.md +++ b/tools/test-helper/README.md @@ -1,23 +1,29 @@ # Test helper This is a small VS Code extension that helps with managing Typst's test suite. -When installed, three new buttons appear in the menubar for all `.typ` files in -the `tests` folder. +When installed, a new Code Lens appears in all `.typ` files in the `tests` +folder. It provides the following actions: -- Open: Opens the output and reference images of a test to the side. -- Refresh: Refreshes the preview. -- Rerun: Re-runs the test. -- Update: Copies the output into the reference folder and optimizes - it with `oxipng`. +- View: Opens the output and reference image of a test to the side. +- Run: Runs the test and shows the results to the side. +- Terminal: Runs the test in the integrated terminal. -For the test helper to work correctly, you also need to install `oxipng`, for -example with `cargo install oxipng`. Make sure that the version of oxipng you -install is the same as the one in the root `Cargo.toml` so that the results are -the same as when using the test CLI. +In the side panel, there are a few menu actions at the top right: + +- Refresh: Reloads the panel to reflect changes to the images +- Run: Runs the test and shows the results +- Save: Runs the test with `--update` to save the reference image ## Installation -The simplest way to install this extension (and keep it up-to-date) is to use VSCode's UI: -* Go to View > Command Palette, -* In the drop down list, pick command "Developer: Install extension from location", -* Select this `test-helper` directory in the file explorer dialogue box. VSCode will add -the extension's path to `~/.vscode/extensions/extensions.json`. +First, you need to build the extension: +```bash +npm i +npm run build +``` + +Then, you can easily install and (and keep it up-to-date) via VS Code's UI: +- Go to View > Command Palette or press Cmd/Ctrl+P, +- In the drop down list, pick command "Developer: Install extension from + location", +- Select this `test-helper` directory in the file explorer dialogue box. VS Code + will add the extension's path to `~/.vscode/extensions/extensions.json`. |
