code: def test_targets_single_dir_with_file(tmp_dir, scm, dvc):
      setup_targets_test(tmp_dir)
  
      expected_result = {
          "added": [
              {
                  "path": os.path.join("dir_with", "file.txt"),
                  "hash": digest("first"),
              }
          ],
          "deleted": [],
          "modified": [],
          "not in cache": [],
          "renamed": [],
      }
  
      assert (
          dvc.diff(targets=["dir_with"], recursive=True)
          == expected_result
      )
      assert (
          dvc.diff(targets=["dir_with" + os.path.sep], recursive=True)
          == expected_result
      )
  
imports: import hashlib
  import os
  import pytest
  from funcy import first
  from dvc.exceptions import DvcException
  from dvc.utils.fs import remove
label_desc: Use image node_id 24 for calling a global function with example usage: test_targets_single_dir_with_file(tmp_dir, scm, dvc) without return types