CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/api/v2/bookmarks.test.ts
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2024 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
// import { v4 } from "uuid";
7
8
// import { createMocks } from "lib/api/test-framework";
9
// import get from "./bookmarks/get";
10
// import set from "./bookmarks/set";
11
12
// TODO: this does not work at all. That mock does not authenticate with the API, hence you only get an error.
13
14
describe("/api/v2/bookmarks", () => {
15
// const project_id = v4();
16
17
test("set then get", async () => {
18
// const { req, res } = createMocks({
19
// method: "POST",
20
// url: "/api/v2/bookmarks/set",
21
// body: {
22
// type: "starred-files",
23
// project_id,
24
// payload: ["foo.md", "bar.ipynb"],
25
// },
26
// });
27
// await set(req, res);
28
// expect(res.statusCode).toBe(200);
29
// console.log(res._getJSONData());
30
});
31
});
32
33