@jupyterlab/rendermime 4.0.0-alpha.16 → 4.0.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/testutils.d.ts +10 -0
- package/lib/testutils.js +57 -0
- package/lib/testutils.js.map +1 -0
- package/package.json +11 -16
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IOutput } from '@jupyterlab/nbformat';
|
|
2
|
+
import { RenderMimeRegistry } from './registry';
|
|
3
|
+
/**
|
|
4
|
+
* The default outputs used for testing.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_OUTPUTS: IOutput[];
|
|
7
|
+
/**
|
|
8
|
+
* Get a copy of the default rendermime instance.
|
|
9
|
+
*/
|
|
10
|
+
export declare function defaultRenderMime(): RenderMimeRegistry;
|
package/lib/testutils.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { standardRendererFactories } from './factories';
|
|
4
|
+
import { RenderMimeRegistry } from './registry';
|
|
5
|
+
/**
|
|
6
|
+
* The default outputs used for testing.
|
|
7
|
+
*/
|
|
8
|
+
export const DEFAULT_OUTPUTS = [
|
|
9
|
+
{
|
|
10
|
+
name: 'stdout',
|
|
11
|
+
output_type: 'stream',
|
|
12
|
+
text: ['hello world\n', '0\n', '1\n', '2\n']
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'stderr',
|
|
16
|
+
output_type: 'stream',
|
|
17
|
+
text: ['output to stderr\n']
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'stderr',
|
|
21
|
+
output_type: 'stream',
|
|
22
|
+
text: ['output to stderr2\n']
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
output_type: 'execute_result',
|
|
26
|
+
execution_count: 1,
|
|
27
|
+
data: { 'text/plain': 'foo' },
|
|
28
|
+
metadata: {}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
output_type: 'display_data',
|
|
32
|
+
data: { 'text/plain': 'hello, world' },
|
|
33
|
+
metadata: {}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
output_type: 'error',
|
|
37
|
+
ename: 'foo',
|
|
38
|
+
evalue: 'bar',
|
|
39
|
+
traceback: ['fizz', 'buzz']
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* Get a copy of the default rendermime instance.
|
|
44
|
+
*/
|
|
45
|
+
export function defaultRenderMime() {
|
|
46
|
+
return Private.rendermime.clone();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A namespace for private data.
|
|
50
|
+
*/
|
|
51
|
+
var Private;
|
|
52
|
+
(function (Private) {
|
|
53
|
+
Private.rendermime = new RenderMimeRegistry({
|
|
54
|
+
initialFactories: standardRendererFactories
|
|
55
|
+
});
|
|
56
|
+
})(Private || (Private = {}));
|
|
57
|
+
//# sourceMappingURL=testutils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testutils.js","sourceRoot":"","sources":["../src/testutils.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;KAC7C;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,CAAC,oBAAoB,CAAC;KAC7B;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,CAAC,qBAAqB,CAAC;KAC9B;IACD;QACE,WAAW,EAAE,gBAAgB;QAC7B,eAAe,EAAE,CAAC;QAClB,IAAI,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;QAC7B,QAAQ,EAAE,EAAE;KACb;IACD;QACE,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,EAAE,YAAY,EAAE,cAAc,EAAE;QACtC,QAAQ,EAAE,EAAE;KACb;IACD;QACE,WAAW,EAAE,OAAO;QACpB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KAC5B;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,IAAU,OAAO,CAIhB;AAJD,WAAU,OAAO;IACF,kBAAU,GAAG,IAAI,kBAAkB,CAAC;QAC/C,gBAAgB,EAAE,yBAAyB;KAC5C,CAAC,CAAC;AACL,CAAC,EAJS,OAAO,KAAP,OAAO,QAIhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/rendermime",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.17",
|
|
4
4
|
"description": "JupyterLab - RenderMime",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
6
|
"bugs": {
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"watch": "tsc -b --watch"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@jupyterlab/apputils": "^4.0.0-alpha.
|
|
45
|
-
"@jupyterlab/coreutils": "^6.0.0-alpha.
|
|
46
|
-
"@jupyterlab/nbformat": "^4.0.0-alpha.
|
|
47
|
-
"@jupyterlab/observables": "^5.0.0-alpha.
|
|
48
|
-
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.
|
|
49
|
-
"@jupyterlab/services": "^7.0.0-alpha.
|
|
50
|
-
"@jupyterlab/translation": "^4.0.0-alpha.
|
|
44
|
+
"@jupyterlab/apputils": "^4.0.0-alpha.17",
|
|
45
|
+
"@jupyterlab/coreutils": "^6.0.0-alpha.17",
|
|
46
|
+
"@jupyterlab/nbformat": "^4.0.0-alpha.17",
|
|
47
|
+
"@jupyterlab/observables": "^5.0.0-alpha.17",
|
|
48
|
+
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.17",
|
|
49
|
+
"@jupyterlab/services": "^7.0.0-alpha.17",
|
|
50
|
+
"@jupyterlab/translation": "^4.0.0-alpha.17",
|
|
51
51
|
"@lumino/coreutils": "^2.0.0-alpha.6",
|
|
52
52
|
"@lumino/messaging": "^2.0.0-alpha.6",
|
|
53
53
|
"@lumino/signaling": "^2.0.0-alpha.6",
|
|
@@ -55,16 +55,11 @@
|
|
|
55
55
|
"lodash.escape": "^4.0.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@jupyterlab/
|
|
59
|
-
"@
|
|
60
|
-
"@jupyterlab/testutils": "^4.0.0-alpha.16",
|
|
61
|
-
"@types/jest": "^26.0.10",
|
|
58
|
+
"@jupyterlab/testing": "^4.0.0-alpha.17",
|
|
59
|
+
"@types/jest": "^29.2.0",
|
|
62
60
|
"@types/lodash.escape": "^4.0.6",
|
|
63
|
-
"fs-extra": "^
|
|
64
|
-
"jest": "^26.4.2",
|
|
65
|
-
"json2html": "^0.0.8",
|
|
61
|
+
"fs-extra": "^10.1.0",
|
|
66
62
|
"rimraf": "~3.0.0",
|
|
67
|
-
"ts-jest": "^26.3.0",
|
|
68
63
|
"typedoc": "~0.22.10",
|
|
69
64
|
"typescript": "~4.7.3"
|
|
70
65
|
},
|