code: def test_fails_with_unknown_event_name(self) -> None:
      cb = CustomJS(code="foo")
      m = SomeModel()
      with pytest.raises(ValueError):
          m.js_on_event("foo", cb)
  
imports: from __future__ import annotations
  import pytest
  from bokeh.core.has_props import is_abstract
  from bokeh.core.properties import Int, List, String
  from bokeh.core.types import ID
  from bokeh.models import *
  from bokeh.models import CustomJS
  from bokeh.plotting import *
  from bokeh.document import document
  from bokeh.model import Model
label_desc: Use image node_id 1 for calling the Test_js_on_event obj's underlying member method code with example usage: obj.test_fails_with_unknown_event_name() without return types