On this page
DocumentationContributing

Testing standards

Use this page when you need to decide which tests and validation evidence a tax behaviour change needs.

Required evidence by change

Test types

Golden tests should use official examples or reviewed scenarios and live with the rule package they validate.

Type tests should prove public SDK descriptors reject unsupported facts, calculator IDs, jurisdictions and tax years at compile time.

API compatibility tests should prove CalculatorRunRequest, CalculatorRunResponse and route-owned error envelopes still match public HTTP expectations.

SDK compatibility tests should prove calculate, calculateSafe, calculateRun, calculateReport, calculateReport and jurisdiction helpers still infer the expected input, report and error types.

Commands

Use package-specific commands when your change is local:

Terminal
bun run --filter=@taxkit/rules-au-pay test
bun run --filter=@taxkit/rules-au-income-tax test
bun run --filter=@taxkit/rules-au-stsl test
bun run --filter=@taxkit/calculators test
bun run --filter=@taxkit/api-http test
bun run --filter=taxkit check-types

Before handoff, run the repository gate:

Terminal
bun run verification

Source of truth

For the full quality model, read Testing and quality and Rule and calculation tests.