import assert from "assert"; import { RealAppTest } from "../test_utils/test-on-real-app.js"; describe("sealious-list test", () => { it("creates minimal sealious app and adds a simple route that works", async function () { const test_app = await RealAppTest.init(); const url = "/list"; await test_app.runSealgenCommand(`add-collection --collection_name=samples`); await test_app.runSealgenCommand( `add-route --url=${url} --action=List --mode=list --collection=samples` ); await test_app.start(); const res_post = await test_app.httpPOST("/api/v1/collections/samples", { content: "some-content", }); assert(res_post.status == 201); const res = await test_app.httpGET(url); if (res.status != 200) { throw new Error("url generated by add-route exists but doesn't return 200"); } assert(res.response.includes("some-content")); await test_app.close(); }).timeout(100 * 1000); });