Add onProgress callback to PutConfig
[arvados.git] / src / common / api / order-builder.test.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { OrderBuilder } from "./order-builder";
6
7 describe("OrderBuilder", () => {
8     it("should build correct order query", () => {
9         const order = OrderBuilder
10             .create()
11             .addAsc("kind")
12             .addDesc("modifiedAt")
13             .getOrder();
14         expect(order).toEqual(["kind asc", "modified_at desc"]);
15     });
16
17     it("should combine results with other builder", () => {
18         const order = OrderBuilder
19             .create()
20             .addAsc("kind")
21             .concat(OrderBuilder
22                 .create("properties")
23                 .addDesc("modifiedAt"))
24             .getOrder();
25         expect(order).toEqual(["kind asc", "properties.modified_at desc"]);
26     });
27 });