docstr: Test that an error is raised if an invalid icon is provided.
docstr_tok: ["Test","that","an","error","is","raised","if","an","invalid","icon","is","provided","."]
code: def test_invalid_icon(self):
      """Test that an error is raised if an invalid icon is provided."""
      with self.assertRaises(StreamlitAPIException) as e:
          st.toast("toast text", icon="invalid")
      self.assertEqual(
          str(e.exception),
          'The value "invalid" is not a valid emoji. Shortcodes are not allowed, please use a single character instead.',
      )
  
file_path: streamlit/lib/tests/streamlit/toast_test.py
imports: import streamlit
  from streamlit.errors import StreamlitAPIException
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 4 for calling the ToastTest obj's underlying member method code with example usage: obj.test_invalid_icon() without return types