@@ -33,7 +33,7 @@ Run the tests:
33
33
- Save the resulting ` .ipynb ` file in ` fixtures/ ` (e.g. ` my_test.ipynb ` )
34
34
35
35
- Add a JavaScript test file in ` js_tests/ ` by first requiring the in-house
36
- [ ` tape ` ] ( https://github.com/substack/tape ) test wrapper found in ` lib/tape-wrapper.js ` .
36
+ [ ` tape ` ] ( https://github.com/substack/tape ) test wrapper found in ` lib/tape-wrapper.js ` .
37
37
38
38
For example,
39
39
@@ -48,13 +48,13 @@ test('should have one plotly.js graph', function(t) {
48
48
});
49
49
```
50
50
51
- asserts that one plotly graph is present in the notebook.
51
+ asserts that one plotly graph is present in the notebook.
52
52
53
- At the moment, it is highly recommended that the js test file has the same name
53
+ At the moment, it is highly recommended that the ` js ` test file has the same name
54
54
(minus the extension) as the ` .ipynb ` fixture (i.e. ` my_test.js ` in this
55
55
example).
56
56
57
- - Add a test case in ` test_jupyter.py ` . If both the fixture and js test file
57
+ - Add a test case in ` test_jupyter.py ` . If both the fixture and ` js ` test file
58
58
have the same name, simply add:
59
59
60
60
``` py
@@ -70,12 +70,12 @@ to `test_jupyter.py` and you're done :beers:
70
70
71
71
The ` Common ` test class in ` test_jupyter.py ` :
72
72
73
- - Loads up a given ` ipynb ` fixture
73
+ - Loads up a given ` . ipynb` fixture
74
74
75
- - Executes all code cells and converts it to HTML using the
75
+ - Executes all code cells and converts them to HTML using the
76
76
[ ` nbconvert ` ] ( https://nbconvert.readthedocs.io/en/latest/ ) and
77
77
[ ` ipykernel ` ] ( http://ipython.readthedocs.io/en/stable/install/kernel_install.html )
78
- modules.
78
+ modules.
79
79
80
80
- Saves the resulting HTML file is saved in ` fixtures/ ` but is git-ignored.
81
81
@@ -85,22 +85,22 @@ Then, `Common` runs an `npm` command in the shell:
85
85
npm test -- < path-to-html-fixture> < path-to-js-test-file>
86
86
```
87
87
88
- which runs a minimal server using ` lib/server.js ` .
88
+ which runs a minimal server using ` lib/server.js ` .
89
89
90
90
In details, ` lib/server.js ` :
91
91
92
- - bundles up the js test code into a single bundle using
92
+ - bundles up the ` js ` test code into a single bundle using
93
93
[ ` browserify ` ] ( https://github.com/substack/node-browserify )
94
94
95
- - stubs in a ` <script> ` tag to include the js test bundle in the fixture HTML
95
+ - stubs in a ` <script> ` tag to include the ` js ` test bundle in the fixture HTML
96
96
97
97
- starts a simple http server
98
98
99
99
- launches Chrome at the HTML fixture URL
100
100
101
- - once the page is loaded, the js tests are run and results are logged in the
101
+ - once the page is loaded, the ` js ` tests are run and results are logged in the
102
102
terminal
103
103
104
104
105
- See PR [ #540 ] ( https://github.com/plotly/plotly.py/pull/549 ) for the details on
105
+ See PR [ #549 ] ( https://github.com/plotly/plotly.py/pull/549 ) for the details on
106
106
how this suite was first implemented.
0 commit comments