Skip to content

Commit ca6a38e

Browse files
committed
Fixes #66
1 parent 8f51ec2 commit ca6a38e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/server.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,15 @@ exports.Server = function Server(bsClient, workers) {
8282
'mocha': ['mocha-plugin.js']
8383
};
8484

85-
if (mimeType === 'text/html') {
85+
var filePath = path.relative(process.cwd(), filename);
86+
var pathMatches;
87+
88+
if (typeof config.test_path === 'object') {
89+
pathMatches = (config.test_path.indexOf(filePath) != -1);
90+
} else {
91+
pathMatches = (filePath == config.test_path);
92+
}
93+
if (pathMatches && mimeType === 'text/html') {
8694
var matcher = /(.*)<\/head>/;
8795
var patch = "$1";
8896
scripts.forEach(function(script) {

0 commit comments

Comments
 (0)