Skip to content

Commit b9cd72b

Browse files
committed
Merge pull request #3 from twada/does-not-end-with-path-separator
Work reasonably even if `package.directories.test` does not end with path separator
2 parents cf77710 + c244311 commit b9cd72b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intelli-espower-loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ assert.equal(typeof directories.test, "string", 'You should setting `directories
2727
var testDirectory = directories.test;
2828
require('espower-loader')({
2929
cwd: process.cwd(),
30-
pattern: testDirectory + "**" + pather.sep + "*.js"
30+
pattern: testDirectory + ((testDirectory.lastIndexOf(pather.sep, 0) === 0) ? '' : pather.sep) + "**" + pather.sep + "*.js"
3131
});

0 commit comments

Comments
 (0)