← Back to list

gdunit4-test-writer
by minami110
⭐ 4🍴 0📅 Jan 23, 2026
SKILL.md
name: gdUnit4 Test Writer description: Write gdUnit4 test code with type-specific assertions, signal testing, and scene runner support. Use when creating or updating tests for GDScript files. allowed-tools:
- mcp__context7__resolve-library-id
- mcp__context7__query-docs
- Read
- Write
- Edit
- Glob
- Grep
gdUnit4 Test Writer
Write gdUnit4 test code for GDScript files with proper assertions and test structure.
Workflow
- Analyze target file - Read the GDScript file to understand what needs testing
- Check gdUnit4 docs - Use Context7 (
/websites/godot-gdunit-labs_github_io_gdunit4) if needed - Select assertions - Use type-specific assertions (see [references/assertions.md])
- Create test file - Place in
res://tests/directory withtest_*.gdnaming (e.g.,test_player.gd) - Validate - Use gdscript-validate skill to check for errors
Quick Reference
Test File Template
extends GdUnitTestSuite
func test_example() -> void:
assert_int(1).is_equal(1)
Common Assertions
- int:
assert_int(value).is_equal(10) - float:
assert_float(value).is_equal_approx(3.14, 0.01) - String:
assert_str(text).contains("hello") - Array:
assert_array(items).has_size(5) - Object:
assert_object(node).is_not_null() - Signal:
await assert_signal(emitter).is_emitted("signal_name")
Memory Management
func test_with_node() -> void:
var node: Node = auto_free(Node.new()) # Auto-freed after test
assert_object(node).is_not_null()
References
- references/assertions.md - Complete assertion reference
- references/test-structure.md- Test lifecycle and structure
- references/signals.md - Signal testing guide
- references/scene-runner.md - Scene runner for integration tests
Context7 Library ID
For detailed gdUnit4 documentation:
- Library ID:
/websites/godot-gdunit-labs_github_io_gdunit4
Score
Total Score
65/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
