@@ -25,13 +25,33 @@ const fileExists = async(file) => {
25
25
try {
26
26
await access ( file ) ;
27
27
return true ;
28
- } catch ( err ) {
28
+ } catch ( error ) {
29
+ console . log ( error ) ;
29
30
return false ;
30
31
}
31
32
} ;
32
33
33
34
exports . gruntPostcss = {
34
35
36
+ mapAnnotationPath : async ( test ) => {
37
+ const actual = {
38
+ css : await readFile ( 'tmp/mapAnnotationPath.css' , 'utf8' ) ,
39
+ map : await readFile ( 'tmp/maps/mapAnnotationPath.css.map' , 'utf8' ) ,
40
+ } ;
41
+
42
+ const expected = {
43
+ css : await readFile ( 'test/expected/mapAnnotationPath.css' , 'utf8' ) ,
44
+ map : await readFile ( 'test/expected/maps/mapAnnotationPath.css.map' , 'utf8' ) ,
45
+ } ;
46
+
47
+ test . strictEqual ( actual . css , expected . css ) ;
48
+ test . strictEqual ( actual . map , expected . map ) ;
49
+
50
+ const checkExists = await fileExists ( 'tmp/mapAnnotationPath.css.map' ) ;
51
+ test . ok ( ! checkExists ) ;
52
+ test . done ( ) ;
53
+ } ,
54
+
35
55
defaults : async ( test ) => {
36
56
const actual = {
37
57
css : await readFile ( 'tmp/defaults.css' , 'utf8' ) ,
@@ -41,9 +61,9 @@ exports.gruntPostcss = {
41
61
css : await readFile ( 'test/expected/defaults.css' , 'utf8' ) ,
42
62
} ;
43
63
44
- const checkExists = await fileExists ( 'tmp/defaults.css.map' ) ;
45
-
46
64
test . strictEqual ( actual . css , expected . css ) ;
65
+
66
+ const checkExists = await fileExists ( 'tmp/defaults.css.map' ) ;
47
67
test . ok ( ! checkExists ) ;
48
68
test . done ( ) ;
49
69
} ,
@@ -57,9 +77,9 @@ exports.gruntPostcss = {
57
77
css : await readFile ( 'test/expected/defaults.css' , 'utf8' ) ,
58
78
} ;
59
79
60
- const checkExists = await fileExists ( 'tmp/defaultsFn.css.map' ) ;
61
-
62
80
test . strictEqual ( actual . css , expected . css ) ;
81
+
82
+ const checkExists = await fileExists ( 'tmp/defaultsFn.css.map' ) ;
63
83
test . ok ( ! checkExists ) ;
64
84
test . done ( ) ;
65
85
} ,
@@ -73,9 +93,9 @@ exports.gruntPostcss = {
73
93
css : await readFile ( 'test/expected/mapInline.css' , 'utf8' ) ,
74
94
} ;
75
95
76
- const checkExists = await fileExists ( 'tmp/mapInline.css.map' ) ;
77
-
78
96
test . strictEqual ( actual . css , expected . css ) ;
97
+
98
+ const checkExists = await fileExists ( 'tmp/mapInline.css.map' ) ;
79
99
test . ok ( ! checkExists ) ;
80
100
test . done ( ) ;
81
101
} ,
@@ -96,25 +116,6 @@ exports.gruntPostcss = {
96
116
test . done ( ) ;
97
117
} ,
98
118
99
- mapAnnotationPath : async ( test ) => {
100
- const actual = {
101
- css : await readFile ( 'tmp/mapAnnotationPath.css' , 'utf8' ) ,
102
- map : await readFile ( 'tmp/maps/mapAnnotationPath.css.map' , 'utf8' ) ,
103
- } ;
104
-
105
- const expected = {
106
- css : await readFile ( 'test/expected/mapAnnotationPath.css' , 'utf8' ) ,
107
- map : await readFile ( 'test/expected/maps/mapAnnotationPath.css.map' , 'utf8' ) ,
108
- } ;
109
-
110
- const checkExists = await fileExists ( 'tmp/mapAnnotationPath.css.map' ) ;
111
-
112
- test . strictEqual ( actual . css , expected . css ) ;
113
- test . strictEqual ( actual . map , expected . map ) ;
114
- test . ok ( ! checkExists ) ;
115
- test . done ( ) ;
116
- } ,
117
-
118
119
diff : async ( test ) => {
119
120
const actual = {
120
121
css : await readFile ( 'tmp/diff.css' , 'utf8' ) ,
0 commit comments