Skip to content

Commit 908de8d

Browse files
committed
chore(test): Fix test format
1 parent 80fa848 commit 908de8d

File tree

1 file changed

+40
-30
lines changed

1 file changed

+40
-30
lines changed

test/renderer/epics/loading-spec.js

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,54 @@ import {
1616
import Immutable from 'immutable';
1717

1818
describe('load', () => {
19-
expect(load('mytest.ipynb')).to.deep.equal({ type: 'LOAD', filename: 'mytest.ipynb' })
19+
it('loads a notebook', () => {
20+
expect(load('mytest.ipynb'))
21+
.to.deep.equal({ type: 'LOAD', filename: 'mytest.ipynb' })
22+
})
2023
})
2124

2225
describe('newNotebook', () => {
23-
expect(newNotebook('python3', '/tmp'))
24-
.to.deep.equal({
25-
type: 'NEW_NOTEBOOK',
26-
kernelSpecName: 'python3',
27-
cwd: '/tmp',
28-
})
26+
it('creates a new notebook', () => {
27+
expect(newNotebook('python3', '/tmp'))
28+
.to.deep.equal({
29+
type: 'NEW_NOTEBOOK',
30+
kernelSpecName: 'python3',
31+
cwd: '/tmp',
32+
})
33+
})
2934
})
3035

3136
describe('notebookLoaded', () => {
32-
expect(notebookLoaded('test', dummyCommutable))
33-
.to.deep.equal({
34-
type: 'SET_NOTEBOOK',
35-
filename: 'test',
36-
notebook: dummyCommutable,
37-
})
37+
it('sets a notebook', () => {
38+
expect(notebookLoaded('test', dummyCommutable))
39+
.to.deep.equal({
40+
type: 'SET_NOTEBOOK',
41+
filename: 'test',
42+
notebook: dummyCommutable,
43+
})
44+
})
3845
})
3946

40-
// This test will break the test suite on windows
41-
// describe('extractNewKernel', () => {
42-
// expect(extractNewKernel('/tmp/test.ipynb', dummyCommutable)).to.deep.equal({
43-
// type: 'LAUNCH_KERNEL',
44-
// kernelSpecName: 'python3',
45-
// cwd: '/tmp',
46-
// })
47-
// })
47+
describe('extractNewKernel', () => {
48+
it('extracts and launches the kernel from a notebook', () => {
49+
expect(extractNewKernel('/tmp/test.ipynb', dummyCommutable)).to.deep.equal({
50+
type: 'LAUNCH_KERNEL',
51+
kernelSpecName: 'python3',
52+
cwd: '/tmp',
53+
})
54+
})
55+
})
4856

4957
describe('convertRawNotebook', () => {
50-
const converted = convertRawNotebook({
51-
filename: '/tmp/test.ipynb',
52-
data: dummy,
53-
});
54-
expect(converted.filename).to.equal('/tmp/test.ipynb');
55-
56-
const notebook = converted.notebook;
57-
expect(dummyCommutable.get('metadata').equals(notebook.get('metadata')))
58-
.to.be.true;
58+
it('converts a raw notebook', () => {
59+
const converted = convertRawNotebook({
60+
filename: '/tmp/test.ipynb',
61+
data: dummy,
62+
});
63+
expect(converted.filename).to.equal('/tmp/test.ipynb');
64+
65+
const notebook = converted.notebook;
66+
expect(dummyCommutable.get('metadata').equals(notebook.get('metadata')))
67+
.to.be.true;
68+
})
5969
})

0 commit comments

Comments
 (0)