Page MenuHomeSealhub

collection-response.test.ts
No OneTemporary

collection-response.test.ts

import assert from "assert";
import { withRunningApp } from "../../test_utils/with-test-app.js";
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, 06:26 (21 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557031
Default Alt Text
collection-response.test.ts (752 B)

Event Timeline