@@ -6,7 +6,10 @@ const PDFImage = require('pdf-image').PDFImage
66const PixelDiff = require ( 'pixel-diff' )
77const JsDiff = require ( 'diff' )
88
9- var assert = require ( 'assert' ) ;
9+ var assert = require ( 'assert' )
10+
11+ fs . writeFile ( "/tmp/absolute_path_test.scss" ,
12+ "h1 {color: red; font-size: 140px; text-align:center;}" )
1013
1114describe ( 'Sample tests' , function ( ) {
1215 var tests = [
@@ -40,6 +43,11 @@ describe('Sample tests', function () {
4043 {
4144 sampleName : 'utf8-characters' ,
4245 timeout : 10000
46+ } ,
47+ {
48+ sampleName : 'absolute_path' ,
49+ timeout : 10000 ,
50+ cmdOptions : [ '--basedir' , '/' ]
4351 }
4452 ]
4553 tests . forEach ( function ( test ) {
@@ -54,7 +62,10 @@ describe('Sample tests', function () {
5462 lastTestPNG : path . join ( basedir , 'last_test_result.png' ) ,
5563 html : path . join ( basedir , 'master_temp.htm' )
5664 }
57- var process = spawn ( 'relaxed' , [ paths . master , '--build-once' , '--no-sandbox' ] )
65+ var process = spawn (
66+ 'relaxed' ,
67+ [ paths . master , '--build-once' , '--no-sandbox' ] . concat ( test . cmdOptions || [ ] )
68+ )
5869 process . on ( 'close' , async function ( code ) {
5970 assert . equal ( code , 0 )
6071 var pdfImage = new PDFImage ( paths . pdf , { combinedImage : true } )
0 commit comments