Repository: refinedev/refine
File: packages/supabase/test/getList/index.mock.ts (TypeScript)

Code before:
      "content-profile",
      "public",
      "preference-applied",
      "count=exact",
      "sb-gateway-version",
      "1",
      "x-envoy-upstream-service-time",
      "14",
      "Vary",
      "Accept-Encoding",
      "Server",
      "cloudflare",
      "alt-svc",
      'h3=":443"; ma=86400',
    ],
  );

nock("https://iwdfzvfqbtokqetmbmbp.supabase.co:443", {
  encodedQueryParams: true,
})
  .get("/rest/v1/posts")
  .query({
    select: "%2A",
    offset: "0",
    limit: "10",
    or: "%28title.ilike.%22%25Black+Psorotichia%25%22%2Ccontent.ilike.%22%25Sed+sagittis%25%22%29",
  })
  .reply(
    200,
    [
      {
        id: 1,
        title: "Black Psorotichia Lichen",
        slug: "61a31089-c85d-48a0-a4be-d5dce5c96b6a",
        createdAt: "2024-04-24T13:20:10.200327+00:00",
        content:
          "Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat.\n\nPraesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede.\n\nMorbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem.",
        categoryId: 7,
        images: null,
      },
      {
        id: 13,
        title: "Dust Lichen",
        slug: "ca038c02-0c6f-417b-aaf8-6f51b777d1f5",
        createdAt: "2024-04-24T13:20:10.200327+00:00",
        content:
          "Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.\n\nSed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.",
        categoryId: 7,
        images: null,
      },
    ],

Review comment (suggestion):
It looks like you are changing the mock manually. 

To make tests truly meaningful, we should record them using mock. You can uncomment [here](https://github.com/refinedev/refine/blob/835028ca1161e9b14c6ba2e93c76031b56deffaa/packages/supabase/test/jest.setup.ts#L3) to record responses. After that, nock will print the responses in the console so we can copy and use them.

Code after:
      "content-profile",
      "public",
      "preference-applied",
      "count=exact",
      "sb-gateway-version",
      "1",
      "x-envoy-upstream-service-time",
      "14",
      "Vary",
      "Accept-Encoding",
      "Server",
      "cloudflare",
      "alt-svc",
      'h3=":443"; ma=86400',
    ],
  );

nock("https://iwdfzvfqbtokqetmbmbp.supabase.co:443", {
  encodedQueryParams: true,
})
  .get("/rest/v1/posts")
  .query({
    select: "%2A",
    offset: "0",
    limit: "10",
    or: "%28title.ilike.%22%25Black%20Psorotichia%25%22%2Ccontent.ilike.%22%25Sed%20sagittis%25%22%29",
  })
  .reply(
    200,
    [
      {
        id: 1,
        title: "Black Psorotichia Lichen",
        slug: "61a31089-c85d-48a0-a4be-d5dce5c96b6a",
        createdAt: "2024-04-24T13:20:10.200327+00:00",
        content:
          "Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat.\n\nPraesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede.\n\nMorbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem.",
        categoryId: 7,
        images: null,
      },
      {
        id: 13,
        title: "Dust Lichen",
        slug: "ca038c02-0c6f-417b-aaf8-6f51b777d1f5",
        createdAt: "2024-04-24T13:20:10.200327+00:00",
        content:
          "Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.\n\nSed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.",
        categoryId: 7,
        images: null,
      },
    ],