code: def test_domain_js_find_obj(app, status, warning):
      def find_obj(mod_name, prefix, obj_name, obj_type, searchmode=0):
          return app.env.domains["js"].find_obj(
              app.env, mod_name, prefix, obj_name, obj_type, searchmode
          )
  
      app.build(force_all=True)
  
      assert find_obj(None, None, "NONEXISTANT", "class") == (
          None,
          None,
      )
      assert find_obj(None, None, "NestedParentA", "class") == (
          "NestedParentA",
          ("roles", "NestedParentA", "class"),
      )
      assert find_obj(
          None, None, "NestedParentA.NestedChildA", "class"
      ) == (
          "NestedParentA.NestedChildA",
          ("roles", "NestedParentA.NestedChildA", "class"),
      )
      assert find_obj(
          None, "NestedParentA", "NestedChildA", "class"
      ) == (
          "NestedParentA.NestedChildA",
          ("roles", "NestedParentA.NestedChildA", "class"),
      )
      assert find_obj(
          None, None, "NestedParentA.NestedChildA.subchild_1", "func"
      ) == (
          "NestedParentA.NestedChildA.subchild_1",
          (
              "roles",
              "NestedParentA.NestedChildA.subchild_1",
              "function",
          ),
      )
      assert find_obj(
          None, "NestedParentA", "NestedChildA.subchild_1", "func"
      ) == (
          "NestedParentA.NestedChildA.subchild_1",
          (
              "roles",
              "NestedParentA.NestedChildA.subchild_1",
              "function",
          ),
      )
      assert find_obj(
          None, "NestedParentA.NestedChildA", "subchild_1", "func"
      ) == (
          "NestedParentA.NestedChildA.subchild_1",
          (
              "roles",
              "NestedParentA.NestedChildA.subchild_1",
              "function",
          ),
      )
      assert find_obj(
          "module_a.submodule", "ModTopLevel", "mod_child_2", "meth"
      ) == (
          "module_a.submodule.ModTopLevel.mod_child_2",
          (
              "module",
              "module_a.submodule.ModTopLevel.mod_child_2",
              "method",
          ),
      )
      assert find_obj(
          "module_b.submodule",
          "ModTopLevel",
          "module_a.submodule",
          "mod",
      ) == (
          "module_a.submodule",
          ("module", "module-module_a.submodule", "module"),
      )
  
imports: from unittest.mock import Mock
  import docutils.utils
  import pytest
  from docutils import nodes
  from sphinx import addnodes
  from sphinx.addnodes import desc, desc_annotation, desc_content, desc_name, desc_parameter, desc_parameterlist, desc_sig_keyword, desc_sig_name, desc_sig_space, desc_signature
  from sphinx.domains.javascript import JavaScriptDomain
  from sphinx.testing import restructuredtext
  from sphinx.testing.util import assert_node
  from sphinx.writers.text import STDINDENT
label_desc: Use image node_id 3 for calling a global function with example usage: test_domain_js_find_obj(app, status, warning) and returns: app