@@ -28,3 +28,30 @@ describe("alias", function() {
2828	test ( "exactMatch" ,  css ,  exports . exactMatch ,  aliasOptions ( {  "./path/to/file.png$" : "module/file.png"  } ) ) ; 
2929	test ( "notExactMatch" ,  css ,  exports . notExactMatch ,  aliasOptions ( {  "./path/to/file.jpg$" : "module/file.jpg"  } ) ) ; 
3030} ) ; 
31+ 
32+ describe ( "alias starting with /" ,  function ( )  { 
33+ 	var  css  =  ".className { background: url(/path/to/file.png); }" ; 
34+ 	var  exports  =  { 
35+ 		without : [ 
36+ 			[ 1 ,  ".className { background: url(/path/to/file.png); }" ,  "" ] 
37+ 		] , 
38+ 		onlyModule : [ 
39+ 			[ 1 ,  ".className { background: url({module/file.png}); }" ,  "" ] 
40+ 		] , 
41+ 		exactMatch : [ 
42+ 			[ 1 ,  ".className { background: url({module/file.png}); }" ,  "" ] 
43+ 		] , 
44+ 		notExactMatch : [ 
45+ 			[ 1 ,  ".className { background: url(/path/to/file.png); }" ,  "" ] 
46+ 		] 
47+ 	} ; 
48+ 
49+ 	function  aliasOptions ( alias )  { 
50+ 		return  {  query : {  alias : alias  } } 
51+ 	} 
52+ 
53+ 	test ( "without" ,  css ,  exports . without ) ; 
54+ 	test ( "onlyModule" ,  css ,  exports . onlyModule ,  aliasOptions ( {  "/path/to" : "module"  } ) ) ; 
55+ 	test ( "exactMatch" ,  css ,  exports . exactMatch ,  aliasOptions ( {  "/path/to/file.png$" : "module/file.png"  } ) ) ; 
56+ 	test ( "notExactMatch" ,  css ,  exports . notExactMatch ,  aliasOptions ( {  "/path/to/file.jpg$" : "module/file.jpg"  } ) ) ; 
57+ } ) ; 
0 commit comments