comment-parser 0.7.1 → 0.7.5

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.
@@ -1,80 +0,0 @@
1
- 'use strict'
2
-
3
- const { expect } = require('chai')
4
-
5
- const parser = require('../')
6
-
7
- describe('Comment stringifying', function () {
8
- it('should stringify doc block with description', function () {
9
- const expected = `/**
10
- * Singleline or multiline description text. Line breaks are preserved.
11
- *
12
- * @some-tag {Type} name Singleline or multiline description text
13
- * @some-tag {Type} name.subname Singleline or multiline description text
14
- * @some-tag {Type} name.subname.subsubname Singleline or
15
- * multiline description text
16
- * @some-tag {Type} [optionalName=someDefault]
17
- * @another-tag
18
- */`
19
- const parsed = parser(expected)
20
-
21
- expect(parsed).to.be.an('array')
22
-
23
- const stringified = parser.stringify(parsed)
24
-
25
- expect(stringified).to.eq(expected)
26
- })
27
-
28
- it('should stringify indented doc block with description', function () {
29
- const expected = ` /**
30
- * Singleline or multiline description text. Line breaks are preserved.
31
- *
32
- * @some-tag {Type} name Singleline or multiline description text
33
- * @some-tag {Type} name.subname Singleline or multiline description text
34
- * @some-tag {Type} name.subname.subsubname Singleline or
35
- * multiline description text
36
- * @some-tag {Type} [optionalName=someDefault]
37
- * @another-tag
38
- */`
39
- const parsed = parser(expected)
40
-
41
- expect(parsed).to.be.an('array')
42
-
43
- const stringified = parser.stringify(parsed, { indent: ' ' })
44
-
45
- expect(stringified).to.eq(expected)
46
- })
47
-
48
- it('should stringify numeric indented doc block with description', function () {
49
- const expected = ` /**
50
- * Singleline or multiline description text. Line breaks are preserved.
51
- *
52
- * @some-tag {Type} name Singleline or multiline description text
53
- * @some-tag {Type} name.subname Singleline or multiline description text
54
- * @some-tag {Type} name.subname.subsubname Singleline or
55
- * multiline description text
56
- * @some-tag {Type} [optionalName=someDefault]
57
- * @another-tag
58
- */`
59
- const parsed = parser(expected)
60
-
61
- expect(parsed).to.be.an('array')
62
-
63
- const stringified = parser.stringify(parsed, { indent: 4 })
64
-
65
- expect(stringified).to.eq(expected)
66
- })
67
-
68
- it('should stringify numeric indented doc block without description', function () {
69
- const expected = ` /**
70
- * @param Foo
71
- */`
72
- const parsed = parser(expected)
73
-
74
- expect(parsed).to.be.an('array')
75
-
76
- const stringified = parser.stringify(parsed, { indent: 4 })
77
-
78
- expect(stringified).to.eq(expected)
79
- })
80
- })