move-unit-testing

Official

Write correct Sui Move unit tests fast

AuthorMystenLabs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Move unit tests for Sui commonly end up with incorrect conventions that cause brittle failures, missing diagnostics, or misleading expected-failure behavior.

Core Features & Use Cases

  • Test conventions for Sui Move: enforces correct patterns for naming test functions, using the right assertion style, and structuring test attributes.
  • Accurate expected-failure handling: ensures #[test, expected_failure(...)] is written correctly (including location when aborts occur in another module) and avoids dead-code cleanup after expected aborts.
  • Right test harness selection: guides when to use tx_context::dummy() versus test_scenario (multi-transaction, shared objects, init testing).

Use this when you are asked to add unit tests for a Move module (including success paths, abort/expected_failure cases, authorization checks, and shared-object scenarios) so the resulting tests match Sui’s best practices and are reliable under CI.

Quick Start

Ask the agent to write Sui Move unit tests for my module that follow Sui testing best practices, including expected_failure cases and cleanup rules.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: move-unit-testing
Download link: https://github.com/MystenLabs/skills/archive/main.zip#move-unit-testing

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.