Page MenuHomeSealhub

sealious-list.test.ts
No OneTemporary

sealious-list.test.ts

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);
});

File Metadata

Mime Type
text/x-java
Expires
Wed, May 7, 19:47 (1 d, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
624773
Default Alt Text
sealious-list.test.ts (918 B)

Event Timeline