@@ -28,10 +28,11 @@ describe('stringify(obj)', function(){
28
28
} ) ;
29
29
30
30
describe ( 'stringify(obj, {sourcemap: true})' , function ( ) {
31
- var src = read ( 'test/source-map-case.css' , 'utf8' ) ;
32
- var stylesheet = parse ( src , { source : 'rules.css' , position : true } ) ;
31
+ var file = 'test/source-map-case.css' ;
32
+ var src = read ( file , 'utf8' ) ;
33
+ var stylesheet = parse ( src , { source : file , position : true } ) ;
33
34
function loc ( line , column ) {
34
- return { line : line , column : column , source : 'rules.css' , name : null }
35
+ return { line : line , column : column , source : file , name : null }
35
36
} ;
36
37
37
38
var locs = {
@@ -54,6 +55,7 @@ describe('stringify(obj, {sourcemap: true})', function(){
54
55
map . originalPositionFor ( { line : 11 , column : 0 } ) . should . eql ( locs . mediaBlock ) ;
55
56
map . originalPositionFor ( { line : 12 , column : 2 } ) . should . eql ( locs . mediaOnly ) ;
56
57
map . originalPositionFor ( { line : 17 , column : 0 } ) . should . eql ( locs . comment ) ;
58
+ map . sourceContentFor ( file ) . should . eql ( src ) ;
57
59
} ) ;
58
60
59
61
it ( 'should generate source maps alongside when using compress compiler' , function ( ) {
@@ -66,6 +68,7 @@ describe('stringify(obj, {sourcemap: true})', function(){
66
68
map . originalPositionFor ( { line : 1 , column : 10 } ) . should . eql ( locs . tobiNameValue ) ;
67
69
map . originalPositionFor ( { line : 1 , column : 50 } ) . should . eql ( locs . mediaBlock ) ;
68
70
map . originalPositionFor ( { line : 1 , column : 64 } ) . should . eql ( locs . mediaOnly ) ;
71
+ map . sourceContentFor ( file ) . should . eql ( src ) ;
69
72
} ) ;
70
73
71
74
it ( 'should apply included source maps' , function ( ) {
0 commit comments