File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -83,24 +83,22 @@ fn main() {
8383
8484 let book_dir = format ! ( "file://{}" , current_dir. join( "test_book/book/" ) . display( ) ) ;
8585
86- let mut no_headless = false ;
86+ let mut command = Command :: new ( "npx" ) ;
87+ command
88+ . arg ( "browser-ui-test" )
89+ . args ( [ "--variable" , "DOC_PATH" , book_dir. as_str ( ) ] ) ;
90+
8791 let mut filters = Vec :: new ( ) ;
8892 for arg in std:: env:: args ( ) . skip ( 1 ) {
8993 if arg == "--disable-headless-test" {
90- no_headless = true ;
94+ command. arg ( "--no-headless" ) ;
95+ } else if arg. starts_with ( "--" ) {
96+ command. arg ( arg) ;
9197 } else {
9298 filters. push ( arg) ;
9399 }
94100 }
95101
96- let mut command = Command :: new ( "npx" ) ;
97- command
98- . arg ( "browser-ui-test" )
99- . args ( [ "--variable" , "DOC_PATH" , book_dir. as_str ( ) ] ) ;
100- if no_headless {
101- command. arg ( "--no-headless" ) ;
102- }
103-
104102 let test_dir = "tests/gui" ;
105103 if filters. is_empty ( ) {
106104 command. args ( [ "--test-folder" , test_dir] ) ;
You can’t perform that action at this time.
0 commit comments