File tree Expand file tree Collapse file tree
docs/src/content/docs/test-runner/getting-started Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,40 @@ But just running files isn't traditionally enough. Usually you write more than a
2121
2222This is why lde ships the minimal testing library, [ ` lde-test ` ] ( #`lde-test` ) .
2323
24+ ### Filtering Tests
25+
26+ You can pass glob patterns to ` lde test ` to run only a subset of your test files:
27+
28+ ``` sh
29+ # Run only test files whose name contains "auth"
30+ lde test " *auth*"
31+
32+ # Run only test files inside the unit/ directory
33+ lde test " unit/*"
34+ ```
35+
36+ Multiple filters combine with OR semantics — a file is run if it matches * any* of them:
37+
38+ ``` sh
39+ lde test " *auth*" " unit/*"
40+ ```
41+
42+ You can also target a specific file by path using ` ./ ` or ` ../ ` prefixes:
43+
44+ ``` sh
45+ # Run a specific test file by relative path
46+ lde test ./tests/unit/auth.test.lua
47+ ```
48+
49+ When passing a path, glob characters like ` * ` still work inside the resolved path:
50+
51+ ``` sh
52+ # Run all test files inside the unit/ directory via path
53+ lde test " ./tests/unit/*"
54+ ```
55+
56+ If no files match your filters, the package is skipped silently (or shows "No files matched" in multi-package runs).
57+
2458## lde-test
2559
2660This is a minimal testing library that comes bundled with lde. You can require it in your test files and use its simple API to write tests.
You can’t perform that action at this time.
0 commit comments