File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ var mimeTypes = {
2323
2424exports . Server = function Server ( bsClient , workers ) {
2525
26+ var testFilePaths = ( Array . isArray ( config . test_path ) ? config . test_path : [ config . test_path ] )
27+ . map ( function ( path ) {
28+ return path . split ( / [ ? # ] / ) [ 0 ] ;
29+ } ) ;
30+
2631 function handleFile ( filename , request , response , doNotUseProxy ) {
2732 var url_parts = url . parse ( request . url , true ) ;
2833 var query = url_parts . query ;
@@ -46,13 +51,7 @@ exports.Server = function Server(bsClient, workers) {
4651 } ;
4752
4853 var filePath = path . relative ( process . cwd ( ) , filename ) ;
49- var pathMatches ;
50-
51- if ( typeof config . test_path === 'object' ) {
52- pathMatches = ( config . test_path . indexOf ( filePath ) !== - 1 ) ;
53- } else {
54- pathMatches = ( filePath === config . test_path ) ;
55- }
54+ var pathMatches = ( testFilePaths . indexOf ( filePath ) !== - 1 ) ;
5655
5756 if ( pathMatches && mimeType === 'text/html' ) {
5857 var framework = config [ 'test_framework' ] ;
You can’t perform that action at this time.
0 commit comments