The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Run A Single Unit Test With Rust cargo watch

TODO: Pull subtitle into page object
Code
#!/bin/bash

TEST_NAME=test_posts_basic
cargo watch -i "site" -x "test --lib $TEST_NAME --color always -- --nocapture"

Notes

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Run A Single Unit Test With Rust cargo watch

This is what I'm using for a script to run a 
single test whenever there are code changes.

-- code
-- bash

#!/bin/bash

TEST_NAME=test_posts_basic
cargo watch -i "site" -x "test --lib $TEST_NAME --color always -- --nocapture"


-- notes

- `--nocapture`` is what lets `dbg!()`` debugging 
messages show up. I find that very useful when working
through things


-- todo

[] Write up the individual parts

[] Write a post about just running integration tests
with `--test``

[] Write up about about using all `--lib`` tests

-- ref
-- title: The Cargo Book: cargo-test
-- url: https://doc.rust-lang.org/cargo/commands/cargo-test.html





-- categories
-- Rust 

-- metadata
-- date: 2023-06-21 23:29:20
-- id: 2rxlyt3f
-- site: aws
-- type: post
-- status: draft