import { Component, Input } from "@angular/core"; import { render, screen, waitFor } from "@testing-library/react"; import React from "react"; import { Reactify } from "./reactify"; describe("Reactify", () => { it("should render a standalone Angular component", async () => { @Component({ template: `
TEST
`, standalone: true, }) class TestComp {} render(); await waitFor(() => { expect(screen.getByText("TEST")).toBeTruthy(); }); }); it("should render a standalone Angular component with inputs", async () => { @Component({ template: `
{{ a }}-{{ b }}
`, standalone: true, }) class TestComp { @Input() a = ""; @Input() b = ""; } render(); await waitFor(() => { expect(screen.getByText("foo-bar")).toBeTruthy(); }); }); });