Testing
v2.1.8dirk_fishing ships a built-in test suite powered by lib.test. It validates the inventory bridge (so it doubles as a compatibility check for any inventory) plus fishing-specific logic — XP / level progression and earnings tracking.
Console-only — a connected player can never trigger it, whatever their permissions. Only the server console can.
Running it
From the server console:
Arguments are [nameFilter] [playerId] [+c] in any order (the player id targets a connected player; it defaults to the first online).
The tests briefly mutate the target player's inventory / XP / stats and restore afterwards — run them on a test server, not a live one.
Checking a new inventory works
The inventory tests are bridge-agnostic (ox / qb / qs / devix / bp / …), so this is the quickest way to confirm a new inventory is compatible with dirk_fishing:
- Point dirk_lib at it —
/dirk_config→ Bridging, or just let autodetect pick it up. - Run
dirktest inventoryfrom the server console. - All green = add / remove / metadata / canCarry / usable-items all work through that inventory.
Adding your own tests
Tests live in the resource's tests/ folder. Add one with lib.test.add — full API in the lib.test documentation: