Skip to content
Snippets Groups Projects
Commit 7b9c95a7 authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

fix: don't use frontend for backends of type non-streaming

parent 8ae5cb8b
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,9 @@ for (const templateType of templateTypes) {
}
const appType: AppType =
templateFramework === "express" || templateFramework === "fastapi"
? "--frontend"
? templateType === "simple"
? "--no-frontend" // simple templates don't have frontends
: "--frontend"
: "";
test(`try create-llama ${templateType} ${templateFramework} ${templateEngine} ${templateUI} ${appType}`, async ({
page,
......@@ -46,8 +48,10 @@ for (const templateType of templateTypes) {
const cps = await runApp(cwd, name, appType, port);
// test frontend
await page.goto(`http://localhost:${port}`);
await expect(page.getByText("Built by LlamaIndex")).toBeVisible();
if (appType !== "--no-frontend") {
await page.goto(`http://localhost:${port}`);
await expect(page.getByText("Built by LlamaIndex")).toBeVisible();
}
// TODO: test backend using curl (would need OpenAI key)
// clean processes
cps.forEach((cp) => cp.kill());
......
......@@ -17,11 +17,6 @@ export async function runApp(
try {
switch (appType) {
case "--no-frontend":
cps.push(
await createProcess("npm run dev", `${cwd}/${name}/backend`, port),
);
break;
case "--frontend":
cps.push(
await createProcess(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment