Ash Framework — resources, actions, policies, aggregates; Use when generating resources via mix ash.codegen, editing…
日本語の概要は準備中です。原文の説明を表示しています。
Write or repair Elixir tests with ExUnit, sandbox isolation, async; Use for test files, test setup, or failing/flaky…
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Ash projects: Use
DataCasewithAsh.Testhelpers; test actions via domain code interfaces, not directRepocalls. Seeash-frameworkskill.
Quick reference for Elixir testing patterns.
async: true unless tests modify global state@callback behaviourbuild/2 in factories; insert/2 only when DB neededassert_receive with timeout for async operationsvalidate_required in the schema changeset. Missing fields cause cascading test failures| Testing | Use |
|---|---|
| Controller/API | use MyAppWeb.ConnCase |
| Context/Schema | use MyApp.DataCase |
| LiveView | use MyAppWeb.ConnCase + import Phoenix.LiveViewTest |
| Pure logic | use ExUnit.Case, async: true |
Application.put_envbuild() by default for speedinsert() only when you need DB ID, constraints, or persisted associations# Setup chain
setup [:create_user, :authenticate]
# Pattern matching assertion
assert {:ok, %User{name: name}} = create_user(attrs)
# Async message assertion
assert_receive {:user_created, _}, 5000
# Mox setup
setup :verify_on_exit!
expect(MockAPI, :call, fn _ -> {:ok, "data"} end)
# LiveView async
html = render_async(view) # MUST call for assign_async
| Wrong | Right |
|---|---|
Process.sleep(100) | assert_receive {:done, _}, 5000 |
insert(:user) in factory | build(:user) in factory |
async: true with set_mox_global() | async: false |
| Mock internal modules | Test through public API |
For detailed patterns, see:
references/exunit-patterns.md - Setup, assertions, tagsreferences/mox-patterns.md - Behaviours, expect/stub, asyncreferences/liveview-testing.md - Forms, async, uploadsreferences/factory-patterns.md - ExMachina, sequences, traitsまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Ash Framework — resources, actions, policies, aggregates; Use when generating resources via mix ash.codegen, editing…
日本語の概要は準備中です。原文の説明を表示しています。
Ash Framework — resources, actions, policies, aggregates, calculations, AshPhoenix.Form, LiveView, migrations. Use when generating resources via mix ash.codegen, editing changes, checks, types, validations, or domain code interfaces.
日本語の概要は準備中です。原文の説明を表示しています。
Compatibility alias for the Elixir/Phoenix plugin's LiveView assigns audit. Invoke explicitly with /lv:assigns.
日本語の概要は準備中です。原文の説明を表示しています。
Inspect LiveView socket assigns for memory bloat — missing temporary_assigns, unused assigns, unbounded lists needing streams, memory estimates. Use when LiveView memory grows or you need to add temporary_assigns.
日本語の概要は準備中です。原文の説明を表示しています。
Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.
日本語の概要は準備中です。原文の説明を表示しています。
Analyze Phoenix context boundaries and module coupling via mix xref. Use when checking cross-context calls, validating dependencies, before splitting modules, or reviewing architecture.
日本語の概要は準備中です。原文の説明を表示しています。