message: test: for /record/comment(s)
diff: @@ -204,4 +204,74 @@ describe("RecordClient", () => {
  expect(mockClient.getLogs()[0].params).toEqual(params);
  });
  });
  +
  + describe("addComment", () => {
  + const params = {
  + app: APP_ID,
  + record: RECORD_ID,
  + comment: {
  + text: "hello",
  + mentions: [
  + {
  + code: "Administrator",
  + type: "USER" as const
  + }
  + ]
  + }
  + };
  + beforeEach(() => {
  + recordClient.addComment(params);
  + });
  + it("should pass the path to the http client", () => {
  + expect(mockClient.getLogs()[0].path).toBe("/k/v1/record/comment.json");
  + });
  + it("should send a post request", () => {
  + expect(mockClient.getLogs()[0].method).toBe("post");
  + });
  + it("should pass app, record and comment to the http client", () => {
  + expect(mockClient.getLogs()[0].params).toEqual(params);
  + });
  + });
  +
  + describe("deleteComment", () => {
  + const params = {
  + app: APP_ID,
  + record: RECORD_ID,
  + comment: "1"
  + };
  + beforeEach(() => {
  + recordClient.deleteComment(params);
  + });
  + it("should pass the path to the http client", () => {
  + expect(mockClient.getLogs()[0].path).toBe("/k/v1/record/comment.json");
  + });
  + it("should send a delete request", () => {
  + expect(mockClient.getLogs()[0].method).toBe("delete");
  + });
  + it("should pass app, record and comment to the http client", () => {
  + expect(mockClient.getLogs()[0].params).toEqual(params);
  + });
  + });
  +
  + describe("getComments", () => {
  + const params = {
  + app: APP_ID,
  + record: RECORD_ID,
  + order: "desc" as const,
  + offset: 5,
  + limit: 5
  + };
  + beforeEach(() => {
  + recordClient.getComments(params);
  + });
  + it("should pass the path to the http client", () => {
  + expect(mockClient.getLogs()[0].path).toBe("/k/v1/record/comments.json");
  + });
  + it("should send a get request", () => {
  + expect(mockClient.getLogs()[0].method).toBe("get");
  + });
  + it("should pass app, record, order, offset and limit to the http client", () => {
  + expect(mockClient.getLogs()[0].params).toEqual(params);
  + });
  + });
  });
  