Page MenuHomeSealhub

collection-response.test.ts
No OneTemporary

collection-response.test.ts

import assert from "assert";
import { withRunningApp } from "../../test_utils/with-test-app";
describe("request multiple ids", () => {
it("returns proper length and empty status for empty response", async () =>
withRunningApp(async ({ app, rest_api }) => {
const response = new app.Sealious.Responses.CollectionResponse({
items: [],
});
assert.equal(response.length, 0);
assert.equal(response.empty, true);
}));
it("returns proper length and empty status for nonempty response", async () =>
withRunningApp(async ({ app, rest_api }) => {
const response = new app.Sealious.Responses.CollectionResponse({
items: [{}, {}],
});
assert.equal(response.length, 2);
assert.equal(response.empty, false);
}));
});

File Metadata

Mime Type
text/x-java
Expires
Tue, Dec 24, 11:41 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557084
Default Alt Text
collection-response.test.ts (749 B)

Event Timeline