Update testEmission to use optional chaining and null coalescing.
Update testEmission to use optional chaining and null coalescing.

Also make second parameter optional, since each property was already optional.
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab