mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-12 19:25:17 +00:00
21 lines
501 B
TypeScript
21 lines
501 B
TypeScript
import { nextPage } from "./IteratorUtilities";
|
|
|
|
describe("nextPage", () => {
|
|
it("returns results for the next page", async () => {
|
|
const fakeIterator = {
|
|
fetchNext: () =>
|
|
Promise.resolve({
|
|
resources: [],
|
|
hasMoreResults: false,
|
|
continuation: "foo",
|
|
queryMetrics: {},
|
|
requestCharge: 1,
|
|
headers: {},
|
|
activityId: "foo",
|
|
}),
|
|
};
|
|
|
|
expect(await nextPage(fakeIterator, 10)).toMatchSnapshot();
|
|
});
|
|
});
|