code: def test_js_data(app):
      text = ".. js:data:: name"
      doctree = restructuredtext.parse(app, text)
      assert_node(
          doctree,
          (
              addnodes.index,
              [
                  desc,
                  (
                      [
                          desc_signature,
                          ([desc_name, ([desc_sig_name, "name"])]),
                      ],
                      [desc_content, ()],
                  ),
              ],
          ),
      )
      assert_node(
          doctree[0],
          addnodes.index,
          entries=[
              (
                  "single",
                  "name (global variable or constant)",
                  "name",
                  "",
                  None,
              )
          ],
      )
      assert_node(
          doctree[1],
          addnodes.desc,
          domain="js",
          objtype="data",
          no_index=False,
      )
  
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 8 for calling a global function with example usage: test_js_data(app) without return types