[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BV4HWXZ6JDR9FNB9S0FTS7":3,"skill-same:01M7BV4HWXZ6JDR9FNB9S0FTS7":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7BV4HWXZ6JDR9FNB9S0FTS7","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.","nguyenhungtran18\u002Fskill-and-tool-tracker","nguyenhungtran18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F297063550?v=4","01M7BV0BFPRRFP84F2ME0FYZ9D","01M7BV0BG83FA5P22NJV0GR0A5",1,"MIT","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fdart-add-unit-test\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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: Mon, 03 Aug 2026 21:51:24 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":23,"description":7},{"model":24,"last_modified":25},"models\u002Fgemini-3.1-pro-preview","Mon, 03 Aug 2026 21:51:24 GMT","main","900ea3c9eb045fd5b0317dc1103777ecf3ea4aeb","skills\u002Fdart-add-unit-test",0,"https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker","https:\u002F\u002Fnguyenhungtran18.github.io\u002Fskill-and-tool-tracker\u002F","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18","2026-08-31 18:36:09",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill dart-add-unit-test",{"tool":40,"command":41},"bunx","bunx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill dart-add-unit-test",{"tool":43,"command":44},"pnpm","pnpm dlx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill dart-add-unit-test","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fdart-add-unit-test\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7BVP4P83TK60JZ4P8RP9VP7","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fxcode_project_setup\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7BVP01K4CSJJ8G90FT8S2D5","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7BVNY22GXD871GYTSH599F1","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7BVNQWF24RNKA8A4KM2HJ3T","workflow-skill-creator","Distills a completed user workflow or interaction into a reusable agent skill. Use when the user asks to turn their workflow, interaction, or multi-step process into a skill, or when they say \"make this a skill\", \"create a skill from what we just did\", \"package this workflow\" or similar. Do not use for creating skills from scratch without an existing workflow (use a generic skill-creator for that).","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow_skill_creator\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7BVNNY67XPCQAQHY3FBKDGC","verify-and-stop","Prove existing work meets acceptance conditions without expanding scope. Use for validation-only tasks, completion checks, focused gate runs, and last-mile proof.","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fverify-and-stop\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7BVNKB4Z7SZT85B73ZZ90Y6","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[]]