Loading...
Loading...
Use when writing new functions, adding features, fixing bugs, or refactoring by applying TDD principles - write failing tests before implementation code, make them pass, then refactor.
npx skill4agent add thebushidocollective/han test-driven-development# Start with test
test "calculates total with tax" do
result = Calculator.calculate_total([100, 200])
assert Money.equal?(result, Money.new(:USD, 324))
end
# Run test - should FAIL
mix test# Just enough to pass
def calculate_total(prices) do
prices |> Enum.sum() |> Kernel.*(1.08) |> Money.new(:USD)
endtest/path/module_test.exsapps/api/test/your_app/task/task_test.exsComponentName.test.tsxmobile/libraries/atorasu/atoms/Button/Button.test.tsx# Backend
mix test path/to/test.exs
# Frontend
yarn test path/to/test.tsx