Skip to content

Commit

Permalink
Fixes #66
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulnwn committed Apr 10, 2014
1 parent 8f51ec2 commit ca6a38e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,15 @@ exports.Server = function Server(bsClient, workers) {
'mocha': ['mocha-plugin.js']
};

if (mimeType === 'text/html') {
var filePath = path.relative(process.cwd(), filename);
var pathMatches;

if (typeof config.test_path === 'object') {
pathMatches = (config.test_path.indexOf(filePath) != -1);
} else {
pathMatches = (filePath == config.test_path);
}
if (pathMatches && mimeType === 'text/html') {
var matcher = /(.*)<\/head>/;
var patch = "$1";
scripts.forEach(function(script) {
Expand Down

0 comments on commit ca6a38e

Please sign in to comment.