[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75Q2QZBV4TG4Z146ZHD65Z6":3,"skill-same:01M75Q2QZBV4TG4Z146ZHD65Z6":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M75Q2QZBV4TG4Z146ZHD65Z6","dart-add-unit-test",null,"Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains correct and regression-free.","mictlanix\u002Fmbe-ui","mictlanix","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F703184?v=4","01M75Q1XD9477GXRKPM6JVVC11","Mictlanix","01M75Q1XDXKYX3VS9T3CS2XEFR",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdart-add-unit-test\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: dart-add-unit-test\ndescription: Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains correct and regression-free.\nmetadata:\n  model: models\u002Fgemini-3.1-pro-preview\n  last_modified: Fri, 24 Apr 2026 15:07:58 GMT\n---\n# Testing Dart and Flutter Applications\n\n## Contents\n- [Structuring Test Files](#structuring-test-files)\n- [Writing Tests](#writing-tests)\n- [Executing Tests](#executing-tests)\n- [Test Implementation Workflow](#test-implementation-workflow)\n- [Examples](#examples)\n\n## Structuring Test Files\nOrganize test files to mirror the `lib` directory structure to maintain predictability.\n\n* Place all test code within the `test` directory at the root of the package.\n* Append `_test.dart` to the end of all test file names (e.g., `lib\u002Fsrc\u002Futils.dart` should be tested in `test\u002Fsrc\u002Futils_test.dart`).\n* If writing integration tests, place them in an `integration_test` directory at the root of the package.\n\n## Writing Tests\nUtilize `package:test` as the standard testing library for Dart applications.\n\n* Import `package:test\u002Ftest.dart` (or `package:flutter_test\u002Fflutter_test.dart` for Flutter).\n* Group related tests using the `group()` function to provide shared context.\n* Define individual test cases using the `test()` function.\n* Validate outcomes using the `expect()` function alongside matchers (e.g., `equals()`, `isTrue`, `throwsA()`).\n* Write asynchronous tests using standard `async`\u002F`await` syntax. The test runner automatically waits for the `Future` to complete.\n* Manage test setup and teardown using `setUp()` and `tearDown()` callbacks.\n* If testing code that relies on dependency injection, use `package:mockito` alongside `package:test` to generate mock objects, configure fixed scenarios, and verify interactions.\n\n## Executing Tests\nSelect the appropriate test runner based on the project type and test location.\n\n* If working on a pure Dart project, execute tests using the `dart test` command.\n* If working on a Flutter project, execute tests using the `flutter test` command.\n* If running integration tests, explicitly specify the directory path, as the default runner ignores it: `dart test integration_test` or `flutter test integration_test`.\n\n## Test Implementation Workflow\n\nFollow this sequential workflow when implementing new test suites. Copy the checklist to track your progress.\n\n### Task Progress\n- [ ] 1. Create the test file in the `test\u002F` directory, ensuring the `_test.dart` suffix.\n- [ ] 2. Import `package:test\u002Ftest.dart` and the target library.\n- [ ] 3. Define a `main()` function.\n- [ ] 4. Initialize shared resources or mocks using `setUp()`.\n- [ ] 5. Write `test()` cases grouped by functionality using `group()`.\n- [ ] 6. Execute the test suite using the appropriate CLI command.\n- [ ] 7. **Feedback Loop**: Run test -> Review stack trace for failures -> Fix implementation or assertions -> Re-run until passing.\n\n## Examples\n\n### Standard Unit Test Suite\nDemonstrates grouping, setup, synchronous, and asynchronous testing.\n\n```dart\nimport 'package:test\u002Ftest.dart';\nimport 'package:my_package\u002Fcalculator.dart';\n\nvoid main() {\n  group('Calculator', () {\n    late Calculator calc;\n\n    setUp(() {\n      calc = Calculator();\n    });\n\n    test('adds two numbers correctly', () {\n      expect(calc.add(2, 3), equals(5));\n    });\n\n    test('handles asynchronous operations', () async {\n      final result = await calc.fetchRemoteValue();\n      expect(result, isNotNull);\n      expect(result, greaterThan(0));\n    });\n  });\n}\n```\n\n### Mocking with Mockito\nDemonstrates configuring a mock object for dependency injection testing.\n\n```dart\nimport 'package:test\u002Ftest.dart';\nimport 'package:mockito\u002Fmockito.dart';\nimport 'package:mockito\u002Fannotations.dart';\nimport 'package:my_package\u002Fapi_client.dart';\nimport 'package:my_package\u002Fdata_service.dart';\n\n\u002F\u002F Generate the mock using build_runner: dart run build_runner build\n@GenerateNiceMocks([MockSpec\u003CApiClient>()])\nimport 'data_service_test.mocks.dart';\n\nvoid main() {\n  group('DataService', () {\n    late MockApiClient mockApiClient;\n    late DataService dataService;\n\n    setUp(() {\n      mockApiClient = MockApiClient();\n      dataService = DataService(apiClient: mockApiClient);\n    });\n\n    test('returns parsed data on successful API call', () async {\n      \u002F\u002F Configure the mock\n      when(mockApiClient.get('\u002Fdata')).thenAnswer((_) async => '{\"id\": 1}');\n\n      \u002F\u002F Execute the system under test\n      final result = await dataService.fetchData();\n\n      \u002F\u002F Verify outcomes and interactions\n      expect(result.id, equals(1));\n      verify(mockApiClient.get('\u002Fdata')).called(1);\n    });\n  });\n}\n```\n","# Testing Dart and Flutter Applications\n\n## Contents\n- [Structuring Test Files](#structuring-test-files)\n- [Writing Tests](#writing-tests)\n- [Executing Tests](#executing-tests)\n- [Test Implementation Workflow](#test-implementation-workflow)\n- [Examples](#examples)\n\n## Structuring Test Files\nOrganize test files to mirror the `lib` directory structure to maintain predictability.\n\n* Place all test code within the `test` directory at the root of the package.\n* Append `_test.dart` to the end of all test file names (e.g., `lib\u002Fsrc\u002Futils.dart` should be tested in `test\u002Fsrc\u002Futils_test.dart`).\n* If writing integration tests, place them in an `integration_test` directory at the root of the package.\n\n## Writing Tests\nUtilize `package:test` as the standard testing library for Dart applications.\n\n* Import `package:test\u002Ftest.dart` (or `package:flutter_test\u002Fflutter_test.dart` for Flutter).\n* Group related tests using the `group()` function to provide shared context.\n* Define individual test cases using the `test()` function.\n* Validate outcomes using the `expect()` function alongside matchers (e.g., `equals()`, `isTrue`, `throwsA()`).\n* Write asynchronous tests using standard `async`\u002F`await` syntax. The test runner automatically waits for the `Future` to complete.\n* Manage test setup and teardown using `setUp()` and `tearDown()` callbacks.\n* If testing code that relies on dependency injection, use `package:mockito` alongside `package:test` to generate mock objects, configure fixed scenarios, and verify interactions.\n\n## Executing Tests\nSelect the appropriate test runner based on the project type and test location.\n\n* If working on a pure Dart project, execute tests using the `dart test` command.\n* If working on a Flutter project, execute tests using the `flutter test` command.\n* If running integration tests, explicitly specify the directory path, as the default runner ignores it: `dart test integration_test` or `flutter test integration_test`.\n\n## Test Implementation Workflow\n\nFollow this sequential workflow when implementing new test suites. Copy the checklist to track your progress.\n\n### Task Progress\n- [ ] 1. Create the test file in the `test\u002F` directory, ensuring the `_test.dart` suffix.\n- [ ] 2. Import `package:test\u002Ftest.dart` and the target library.\n- [ ] 3. Define a `main()` function.\n- [ ] 4. Initialize shared resources or mocks using `setUp()`.\n- [ ] 5. Write `test()` cases grouped by functionality using `group()`.\n- [ ] 6. Execute the test suite using the appropriate CLI command.\n- [ ] 7. **Feedback Loop**: Run test -> Review stack trace for failures -> Fix implementation or assertions -> Re-run until passing.\n\n## Examples\n\n### Standard Unit Test Suite\nDemonstrates grouping, setup, synchronous, and asynchronous testing.\n\n```dart\nimport 'package:test\u002Ftest.dart';\nimport 'package:my_package\u002Fcalculator.dart';\n\nvoid main() {\n  group('Calculator', () {\n    late Calculator calc;\n\n    setUp(() {\n      calc = Calculator();\n    });\n\n    test('adds two numbers correctly', () {\n      expect(calc.add(2, 3), equals(5));\n    });\n\n    test('handles asynchronous operations', () async {\n      final result = await calc.fetchRemoteValue();\n      expect(result, isNotNull);\n      expect(result, greaterThan(0));\n    });\n  });\n}\n```\n\n### Mocking with Mockito\nDemonstrates configuring a mock object for dependency injection testing.\n\n```dart\nimport 'package:test\u002Ftest.dart';\nimport 'package:mockito\u002Fmockito.dart';\nimport 'package:mockito\u002Fannotations.dart';\nimport 'package:my_package\u002Fapi_client.dart';\nimport 'package:my_package\u002Fdata_service.dart';\n\n\u002F\u002F Generate the mock using build_runner: dart run build_runner build\n@GenerateNiceMocks([MockSpec\u003CApiClient>()])\nimport 'data_service_test.mocks.dart';\n\nvoid main() {\n  group('DataService', () {\n    late MockApiClient mockApiClient;\n    late DataService dataService;\n\n    setUp(() {\n      mockApiClient = MockApiClient();\n      dataService = DataService(apiClient: mockApiClient);\n    });\n\n    test('returns parsed data on successful API call', () async {\n      \u002F\u002F Configure the mock\n      when(mockApiClient.get('\u002Fdata')).thenAnswer((_) async => '{\"id\": 1}');\n\n      \u002F\u002F Execute the system under test\n      final result = await dataService.fetchData();\n\n      \u002F\u002F Verify outcomes and interactions\n      expect(result.id, equals(1));\n      verify(mockApiClient.get('\u002Fdata')).called(1);\n    });\n  });\n}\n```\n",{"name":5,"metadata":24,"description":7},{"model":25,"last_modified":26},"models\u002Fgemini-3.1-pro-preview","Fri, 24 Apr 2026 15:07:58 GMT","main","228e23386ed058f8a2456399cd68f63999d63adf",".claude\u002Fskills\u002Fdart-add-unit-test","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui","https:\u002F\u002Fgithub.com\u002Fmictlanix","https:\u002F\u002Fmictlanix.com","2026-11-15 04:02:27",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mictlanix\u002Fmbe-ui --skill dart-add-unit-test",{"tool":40,"command":41},"bunx","bunx skills add mictlanix\u002Fmbe-ui --skill dart-add-unit-test",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mictlanix\u002Fmbe-ui --skill dart-add-unit-test","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdart-add-unit-test\u002FSKILL.md",true,[],[49,56,61,68,75,82],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M75QCZHHB42Q7KJTZHQZXZ77","speckit-wireframes-draft","Draw low-fi wireframes for every screen and state the spec describes","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fwireframes\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-wireframes-draft\u002FSKILL.md",[],[],{"skillNo":57,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M75QCXRSD7HM7AFZH4HA9E6S","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-wireframes-draft\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M75QCVS17DXXBTQ8DE2SSXVR","speckit-taskstoissues","Convert existing tasks into actionable, dependency-ordered GitHub issues for the feature based on available design artifacts.","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-taskstoissues\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75QCS3M02XD4PW58EXS6458","speckit-tasks","Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-tasks\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75QCP9NASXGDNYZF6XYJZBD","speckit-specify","Create or update the feature specification from a natural language feature description.","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-specify\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75QCKBPS4K60R4YPRQ8HBJ9","speckit-plan","Execute the implementation planning workflow using the plan template to generate design artifacts.","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-plan\u002FSKILL.md",[],[]]