|
1 | 1 | var chai = require('chai'); |
2 | | -var build = function (filePath) { |
| 2 | +var build = function(filePath) { |
3 | 3 | // |
4 | 4 | }; |
5 | 5 |
|
6 | | -describe('info', function () { |
| 6 | +describe('info', function() { |
7 | 7 |
|
8 | 8 | var result = build('./info-sample.md'); |
9 | 9 | var resultWithoutSpaces = build('./info-sample-2.md'); |
10 | 10 | var expected = require('./info-sample.json'); |
11 | 11 |
|
12 | | -describe('project info', function () { |
| 12 | + describe('project info', function() { |
13 | 13 |
|
14 | | - it('converts `#` to project info', function () { |
15 | | - expect(result.project.title).to.equal(expected.project.title); |
16 | | - expect(resultWithoutSpaces.project.title).to.equal(expected.project.title); |
17 | | - }); |
| 14 | + it('converts `#` to project info', function() { |
| 15 | + expect(result.project.title).to.equal(expected.project.title); |
| 16 | + expect(resultWithoutSpaces.project.title).to.equal(expected.project.title); |
| 17 | + }); |
| 18 | + |
| 19 | + it('converts the following line to project info description', function() { |
| 20 | + expect(result.project.description).to.equal(expected.project.description); |
| 21 | + expect(resultWithoutSpaces.project.description).to.equal(expected.project.description); |
| 22 | + }); |
18 | 23 |
|
19 | | - it('converts the following line to project info description', function () { |
20 | | - expect(result.project.description).to.equal(expected.project.description); |
21 | | - expect(resultWithoutSpaces.project.description).to.equal(expected.project.description); |
22 | 24 | }); |
23 | 25 |
|
24 | | -}); |
| 26 | + describe('chapter info', function() { |
25 | 27 |
|
26 | | -describe('chapter info', function () { |
| 28 | + it('converts `##` to chapter info', function() { |
| 29 | + expect(result.project.description).to.equal(expected.project.description); |
| 30 | + expect(resultWithoutSpaces.project.description).to.equal(expected.project.description); |
| 31 | + }); |
27 | 32 |
|
28 | | - it('converts `##` to chapter info', function () { |
29 | | - expect(result.project.description).to.equal(expected.project.description); |
30 | | - expect(resultWithoutSpaces.project.description).to.equal(expected.project.description); |
31 | | - }); |
| 33 | + it('converts the following line to chapter info description', function() { |
| 34 | + expect(result.chapters[0].description).to.equal(expected.chapters[0].description); |
| 35 | + expect(resultWithoutSpaces.chapters[0].description).to.equal(expected.chapters[0].description); |
| 36 | + }); |
32 | 37 |
|
33 | | - it('converts the following line to chapter info description', function () { |
34 | | - expect(result.chapters[0].description).to.equal(expected.chapters[0].description); |
35 | | - expect(resultWithoutSpaces.chapters[0].description).to.equal(expected.chapters[0].description); |
36 | 38 | }); |
37 | 39 |
|
38 | | -}); |
| 40 | + describe('page info', function() { |
39 | 41 |
|
40 | | -describe('page info', function () { |
| 42 | + it('converts `###` to page info', function() { |
| 43 | + expect(result.chapters[0].pages[0].title).to.equal(expected.chapters[0].pages[0].title); |
| 44 | + expect(resultWithoutSpaces.chapters[0].pages[0].title).to.equal(expected.chapters[0].pages[0].title); |
| 45 | + }); |
41 | 46 |
|
42 | | - it('converts `###` to page info', function () { |
43 | | - expect(result.chapters[0].pages[0].title).to.equal(expected.chapters[0].pages[0].title); |
44 | | - expect(resultWithoutSpaces.chapters[0].pages[0].title).to.equal(expected.chapters[0].pages[0].title); |
45 | | - }); |
| 47 | + it('converts the following line to page info description', function() { |
| 48 | + expect(result.chapters[0].pages[0].description).to.equal(expected.chapters[0].pages[0].description); |
| 49 | + expect(resultWithoutSpaces.chapters[0].pages[0].description).to.equal(expected.chapters[0].pages[0].description); |
| 50 | + }); |
46 | 51 |
|
47 | | - it('converts the following line to page info description', function () { |
48 | | - expect(result.chapters[0].pages[0].description).to.equal(expected.chapters[0].pages[0].description); |
49 | | - expect(resultWithoutSpaces.chapters[0].pages[0].description).to.equal(expected.chapters[0].pages[0].description); |
50 | 52 | }); |
51 | 53 |
|
52 | 54 | }); |
53 | | - |
54 | | -}); |
0 commit comments