feat: add multi-engine regex flavour support
This commit is contained in:
@@ -234,6 +234,26 @@ afterEach(() => {
|
||||
});
|
||||
|
||||
describe("Workbench syntax coordination", () => {
|
||||
it("exposes enumerated engine options and forwards the selected C++ grammar", async () => {
|
||||
vi.useFakeTimers();
|
||||
render(<Workbench />);
|
||||
|
||||
fireEvent.change(screen.getByRole("combobox", { name: "Flavour" }), {
|
||||
target: { value: "cpp" },
|
||||
});
|
||||
const grammar = screen.getByRole("combobox", { name: "Grammar" });
|
||||
expect(grammar).toHaveValue("ECMAScript");
|
||||
|
||||
fireEvent.change(grammar, { target: { value: "extended" } });
|
||||
await advanceParseDebounce();
|
||||
|
||||
expect(syntaxHarness.patterns.at(-1)?.request).toMatchObject({
|
||||
flavour: "cpp",
|
||||
flags: ["g"],
|
||||
options: { grammar: "extended" },
|
||||
});
|
||||
});
|
||||
|
||||
it("blocks Run until current syntax arrives and isolates replacement parsing", async () => {
|
||||
vi.useFakeTimers();
|
||||
render(<Workbench />);
|
||||
|
||||
Reference in New Issue
Block a user