Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/jupyter/kernel/test/kernel-data.test.ts
1450 views
1
import {
2
get_kernel_data,
3
get_kernel_data_by_name,
4
getLanguage,
5
getPythonKernelName,
6
} from "@cocalc/jupyter/kernel/kernel-data";
7
8
describe("basic consistency checks with getting kernels", () => {
9
let kernels;
10
it("gets the kernels", async () => {
11
kernels = await get_kernel_data();
12
expect(kernels.length).toBeGreaterThan(0);
13
});
14
15
it("for each kernel above, call get_kernel_data_by_name", async () => {
16
for (const x of kernels) {
17
const d = await get_kernel_data_by_name(x.name);
18
expect(d).toEqual(x);
19
}
20
});
21
22
it("for each kernel above, call getLanguage", async () => {
23
for (const x of kernels) {
24
await getLanguage(x.name);
25
}
26
});
27
28
it("get a python kernel", async () => {
29
await getPythonKernelName();
30
});
31
});
32
33