def test_template_override_component(template, tmp_path):
    """When you add a new component this test will likely fail locally
    because the js files have not been moved to the _frontend_code directory.

    Just build the python package (python -m build -w) to move the latest state of the js directory to _frontend_code.
    """
    _create(
        "MyComponent",
        tmp_path,
        template=template,
        overwrite=True,
        install=False,
        configure_metadata=False,
    )
    app = (tmp_path / "demo" / "app.py").read_text()
    component_files = _create_utils._get_component_code(template)
    answer = textwrap.dedent(
        f"""
import gradio as gr
from gradio_mycomponent import MyComponent

{component_files.demo_code.format(name="MyComponent")}

if __name__ == "__main__":
    demo.launch()
"""
    )
    assert app.strip() == answer.strip()
    assert (tmp_path / "backend" / "gradio_mycomponent" / "mycomponent.py").exists()
    source_code = (
        tmp_path / "backend" / "gradio_mycomponent" / "mycomponent.py"
    ).read_text()
    assert "@document()" not in source_code
When you add a new component this test will likely fail locally
    because the js files have not been moved to the _frontend_code directory.

    Just build the python package (python -m build -w) to move the latest state of the js directory to _frontend_code.
    
test/test_gradio_component_cli.py