mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
21 lines
583 B
TypeScript
21 lines
583 B
TypeScript
import axios from "axios";
|
|
|
|
import JsonServer from "../../src/index";
|
|
import "./index.mock";
|
|
|
|
describe("update", () => {
|
|
it("correct response", async () => {
|
|
const { data } = await JsonServer(
|
|
"https://api.nestjsx-crud.refine.dev",
|
|
axios,
|
|
).update({
|
|
resource: "posts",
|
|
id: "0b4faa6d-6726-4967-be13-e9d05d9aef7f",
|
|
variables: { title: "updated-title" },
|
|
});
|
|
|
|
expect(data["id"]).toBe("0b4faa6d-6726-4967-be13-e9d05d9aef7f");
|
|
expect(data["title"]).toBe("updated-title");
|
|
});
|
|
});
|