diff --git a/intelli-espower-loader.js b/intelli-espower-loader.js index 881dcb2..9c9bb93 100644 --- a/intelli-espower-loader.js +++ b/intelli-espower-loader.js @@ -27,5 +27,5 @@ assert.equal(typeof directories.test, "string", 'You should setting `directories var testDirectory = directories.test; require('espower-loader')({ cwd: process.cwd(), - pattern: testDirectory + "**" + pather.sep + "*.js" + pattern: testDirectory + ((testDirectory.lastIndexOf(pather.sep, 0) === 0) ? '' : pather.sep) + "**" + pather.sep + "*.js" });