-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathutils.test.js
More file actions
43 lines (38 loc) · 1.04 KB
/
Copy pathutils.test.js
File metadata and controls
43 lines (38 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* eslint-disable no-undef */
/**
* @jest-environment jsdom
*/
/* eslint-disable import/no-extraneous-dependencies */
import "regenerator-runtime/runtime";
import {
downLoad_notebook,
load_package,
load_notebook,
load_csv,
} from "../utils";
const cellState = {
cells: [{ id: "cell_1", input: "", output: "", type: "code" }],
};
// FIXME: make blob work with jest;
describe("Download notebook test", () => {
global.URL.createObjectURL = jest.fn();
it("it should download notebook", async () => {
const downloadUrl = downLoad_notebook(cellState);
});
});
describe("Load packages into notebook", () => {
beforeAll(() => {
page.goto("http://localhost:3000/demo");
});
const validPackages = [
"https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest",
"https://cdn.plot.ly/plotly-latest.min.js",
];
const inValidPackages = [
"https://cdn.invalid.com",
"https://cdn.invalid-latest.ly",
];
it("it should load package successfully", async () => {
const loadPackage = load_package(validPackages);
});
});