)]}'
{
  "commit": "0b08d704c2a314d8446a30de75906e7991c6f21b",
  "tree": "181c2269582b1e36a2e9ec7b10966e3941ce44aa",
  "parents": [
    "aacee2c7f722494dbbcb5ce7576b9b63b33a6217"
  ],
  "author": {
    "name": "Nate Bosch",
    "email": "nbosch@google.com",
    "time": "Wed Mar 08 11:22:22 2023 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Mar 08 11:22:22 2023 -0800"
  },
  "message": "Add a hooks_testing library (#1952)\n\nPrevious test for methods like `expect`, `expectLater`, and\r\n`expectAsync` used internal details of the test runner like `LiveTest`\r\nto check behaviors such as holding the test open and specific failure\r\nbehavior.\r\n\r\nAdd an abstraction `TestCaseMonitor` to hide the implementation details\r\nof creating and running a `LocalTest`. Expose only the parts of\r\n`LiveTest` which are used by current tests - the state and errors.\r\nThe new class is defined in a new library `hooks_testing` since it is\r\nintended primarily for writing tests for code that uses the `hooks`\r\nlibrary.\r\nAdd a new `State` enum to hide some details of `LiveTest`.\r\nThere is already a class named `State` that holds the `Status` and\r\n`Result` for a `LiveTest`. This `State` attempts to encode the useful\r\nparts of the status and result into a single enum. We don\u0027t get much use\r\nout of the separate status and result. The `Result` is always `passed`\r\nwhen the `Status` is anything other than `complete` (it shouldn\u0027t be\r\nread), and changing the `Result` to anything else is _always_\r\naccompanied by setting the `status` to `complete`. The new enum also\r\nlets us hide the `failure` and `error` distinction instead of adding new\r\ndependencies to it.\r\nThis works towards #1465\r\n\r\nMigrate tests under `test_api/test/frontend` for the tests which will be\r\nmigrating to `package:matcher` to use the new APIs. Move to a\r\n`utils_new.dart` file which will be moved along with these tests, and\r\nthe old `utils.dart` file will remain for testing the scaffolding APIs.\r\nDo not replace the `expectTestsBlock` utility, the usage of this utility\r\nis not any more clear or readable than spelling out the full behavior in\r\nthe test.\r\n\r\nAdd tests in `checks` for the behavior of holding the test for pending\r\nwork, and for unawaited failures.\r\nAdd utilities for testing against a `TestMonitor` locally within the\r\ntest.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2c35809735a1c58cf14eb19be083120dae46466f",
      "old_mode": 33188,
      "old_path": "pkgs/checks/pubspec.yaml",
      "new_id": "6cf9a7ab962b24d92824f341ca8430a93319096d",
      "new_mode": 33188,
      "new_path": "pkgs/checks/pubspec.yaml"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7d9aba4d40c6e5f211eeb6679266006fc9a6566e",
      "new_mode": 33188,
      "new_path": "pkgs/checks/pubspec_overrides.yaml"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3fd92ac5a39787f346edbfa55717a148803633a8",
      "new_mode": 33188,
      "new_path": "pkgs/checks/test/context_test.dart"
    },
    {
      "type": "modify",
      "old_id": "9d15a05c7eb67368f3cf79e6aa9f5fbbabcc4763",
      "old_mode": 33188,
      "old_path": "pkgs/checks/test/test_shared.dart",
      "new_id": "8c6b2576312f7a137d9a57e844087ddbfcf32c54",
      "new_mode": 33188,
      "new_path": "pkgs/checks/test/test_shared.dart"
    },
    {
      "type": "modify",
      "old_id": "e3fb57db35e926590e1d73dcb30191029911b1aa",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/CHANGELOG.md",
      "new_id": "0b5dd84747b68e1a1ba3d6653d460a67f7b4c055",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/CHANGELOG.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8e4a1e91e9ea1e89b7258336232922b98d33b14c",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/lib/hooks_testing.dart"
    },
    {
      "type": "modify",
      "old_id": "dde2e414b0ff91bdb63a6a34914955bff77b304c",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/frontend/expect_async_test.dart",
      "new_id": "3752b7b103b9fc6bbc36203c1714dda2eeb26186",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/frontend/expect_async_test.dart"
    },
    {
      "type": "modify",
      "old_id": "ee8d243934eb0e14046b3a857482e0cbfc2f5d74",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/frontend/expect_test.dart",
      "new_id": "cae351150b5d1e2f75cd9a2289014dffc037c991",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/frontend/expect_test.dart"
    },
    {
      "type": "modify",
      "old_id": "1aee139a4926638219a79d5894668235747261fa",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/frontend/matcher/completion_test.dart",
      "new_id": "4f114af9b30ce207b2448e71a6e017b211469d8e",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/frontend/matcher/completion_test.dart"
    },
    {
      "type": "modify",
      "old_id": "92ab6a7516f43bc95495a95483a4db8f0e6c76ea",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/frontend/matcher/prints_test.dart",
      "new_id": "337a8124c09b597d9c8ae1a6c5b268c863fde181",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/frontend/matcher/prints_test.dart"
    },
    {
      "type": "modify",
      "old_id": "40b2be6824678389330929bdc6c8ccd8c829fdc2",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/frontend/matcher/throws_test.dart",
      "new_id": "a9e76af3a998598fb4583b59f9e83d7b99e90c3e",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/frontend/matcher/throws_test.dart"
    },
    {
      "type": "modify",
      "old_id": "6e0a48274281693ce5c310eb16826907d884bf0f",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/frontend/matcher/throws_type_test.dart",
      "new_id": "dfad890b9f693c0f64c245946355be55feaf4329",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/frontend/matcher/throws_type_test.dart"
    },
    {
      "type": "modify",
      "old_id": "e9170f93ee3c5597a8530018c75c457cd721220d",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/frontend/never_called_test.dart",
      "new_id": "f4160a3407aaf900cbfda3de49c557f4992737b2",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/frontend/never_called_test.dart"
    },
    {
      "type": "modify",
      "old_id": "deb21fbe1864234dfb6799f22af8dea3a7e8fc36",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/frontend/stream_matcher_test.dart",
      "new_id": "37d37bf828f44db6255225373bd7d473ff6eb956",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/frontend/stream_matcher_test.dart"
    },
    {
      "type": "modify",
      "old_id": "c8c4741bf78c96bde3a7af83ecc78a00171ac9d3",
      "old_mode": 33188,
      "old_path": "pkgs/test_api/test/utils.dart",
      "new_id": "ca3d7293c26a93f4b70f326a59ddc0ac8db8b481",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/utils.dart"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5aa69749e19891c1d936c1027df51bdb9f572fd2",
      "new_mode": 33188,
      "new_path": "pkgs/test_api/test/utils_new.dart"
    }
  ]
}
