@@ -6,57 +6,54 @@ var assert = require('assert'),
6
6
g = chalk . green ,
7
7
m = chalk . magenta
8
8
9
- describe ( 'Jsome' , function ( ) {
10
-
11
- describe ( 'run with' , function ( ) {
12
- describe ( 'spec non-compliant coloured output' , function ( ) {
13
- var expected = y ( '{' ) +
14
- '\n ' + g ( 'string' ) + y ( ': ' ) + y ( '"' ) + m ( 'value' ) + y ( '"' ) +
15
- y ( ',' ) +
16
- '\n ' + g ( 'list' ) + y ( ': ' ) + y ( '[' ) + y ( '"' ) + m ( 'one' ) + y ( '"' ) +
17
- y ( ', ' ) + y ( '"' ) + m ( 'two' ) +
18
- y ( '"' ) + y ( ']' ) +
19
- '\n' + y ( '}' )
20
- var actual = mJsome . getColoredString (
21
- { 'string' : 'value' , 'list' : [ 'one' , 'two' ] }
22
- )
23
-
24
- test ( 'should return a simple non-standard json string' , function ( ) {
25
- assert . equal ( actual , expected )
26
- } )
27
-
28
- test ( 'should return a simple non-standard ANSI escaped, json string' ,
29
- function ( ) {
30
- assert . equal ( enc ( actual ) , enc ( expected ) )
31
- } )
32
-
9
+ describe ( 'Jsome run with' , function ( ) {
10
+
11
+ describe ( 'spec non-compliant coloured output' , function ( ) {
12
+ var expected = y ( '{' ) +
13
+ '\n ' + g ( 'string' ) + y ( ': ' ) + y ( '"' ) + m ( 'value' ) + y ( '"' ) +
14
+ y ( ',' ) +
15
+ '\n ' + g ( 'list' ) + y ( ': ' ) + y ( '[' ) + y ( '"' ) + m ( 'one' ) + y ( '"' ) +
16
+ y ( ', ' ) + y ( '"' ) + m ( 'two' ) +
17
+ y ( '"' ) + y ( ']' ) +
18
+ '\n' + y ( '}' )
19
+ var actual = mJsome . getColoredString (
20
+ { 'string' : 'value' , 'list' : [ 'one' , 'two' ] }
21
+ )
22
+
23
+ test ( 'should return a simple non-standard json string' , function ( ) {
24
+ assert . equal ( actual , expected )
33
25
} )
34
26
35
- describe ( 'spec compliant coloured output' , function ( ) {
36
- var expected = y ( '{' ) +
37
- '\n ' + y ( '"' ) + g ( 'string' ) + y ( '"' ) + y ( ': ' ) + y ( '"' ) + m ( 'value' ) +
38
- y ( '"' ) +
39
- y ( ',' ) +
40
- '\n ' + y ( '"' ) + g ( 'list' ) + y ( '"' ) + y ( ': ' ) + y ( '[' ) + y ( '"' ) +
41
- m ( 'one' ) + y ( '"' ) +
42
- y ( ', ' ) + y ( '"' ) + m ( 'two' ) +
43
- y ( '"' ) + y ( ']' ) +
44
- '\n' + y ( '}' )
45
- mJsome . params . lintable = true
46
- var actual = mJsome . getColoredString (
47
- { 'string' : 'value' , 'list' : [ 'one' , 'two' ] }
48
- )
49
-
50
- test ( 'should return a simple non-standard json string' , function ( ) {
51
- assert . equal ( actual , expected )
27
+ test ( 'should return a simple non-standard ANSI escaped, json string' ,
28
+ function ( ) {
29
+ assert . equal ( enc ( actual ) , enc ( expected ) )
52
30
} )
53
31
54
- test ( 'should return a simple non-standard ANSI escaped, json string' ,
55
- function ( ) {
56
- assert . equal ( enc ( actual ) , enc ( expected ) )
57
- } )
32
+ } )
33
+
34
+ describe ( 'spec compliant coloured output' , function ( ) {
35
+ var expected = y ( '{' ) +
36
+ '\n ' + y ( '"' ) + g ( 'string' ) + y ( '"' ) + y ( ': ' ) + y ( '"' ) + m ( 'value' ) +
37
+ y ( '"' ) +
38
+ y ( ',' ) +
39
+ '\n ' + y ( '"' ) + g ( 'list' ) + y ( '"' ) + y ( ': ' ) + y ( '[' ) + y ( '"' ) +
40
+ m ( 'one' ) + y ( '"' ) +
41
+ y ( ', ' ) + y ( '"' ) + m ( 'two' ) +
42
+ y ( '"' ) + y ( ']' ) +
43
+ '\n' + y ( '}' )
44
+ mJsome . params . lintable = true
45
+ var actual = mJsome . getColoredString (
46
+ { 'string' : 'value' , 'list' : [ 'one' , 'two' ] }
47
+ )
48
+
49
+ test ( 'should return a simple non-standard json string' , function ( ) {
50
+ assert . equal ( actual , expected )
58
51
} )
59
52
53
+ test ( 'should return a simple non-standard ANSI escaped, json string' ,
54
+ function ( ) {
55
+ assert . equal ( enc ( actual ) , enc ( expected ) )
56
+ } )
60
57
} )
61
-
58
+
62
59
} )
0 commit comments