filter ** paths

This commit is contained in:
Robert Brignull 2020-07-08 16:33:00 +01:00
parent abf6f239fa
commit 56417be251
6 changed files with 25 additions and 14 deletions

View file

@ -24,11 +24,11 @@ ava_1.default("emptyPaths", async (t) => {
});
ava_1.default("nonEmptyPaths", async (t) => {
let config = new configUtils.Config();
config.paths.push('path1', 'path2');
config.pathsIgnore.push('path3', 'path4');
config.paths.push('path1', 'path2', '**/path3');
config.pathsIgnore.push('path4', 'path5', 'path6/**');
analysisPaths.includeAndExcludeAnalysisPaths(config, []);
t.is(process.env['LGTM_INDEX_INCLUDE'], 'path1\npath2');
t.is(process.env['LGTM_INDEX_EXCLUDE'], 'path3\npath4');
t.is(process.env['LGTM_INDEX_FILTERS'], 'include:path1\ninclude:path2\nexclude:path3\nexclude:path4');
t.is(process.env['LGTM_INDEX_EXCLUDE'], 'path4\npath5');
t.is(process.env['LGTM_INDEX_FILTERS'], 'include:path1\ninclude:path2\ninclude:**/path3\nexclude:path4\nexclude:path5\nexclude:path6/**');
});
//# sourceMappingURL=analysis-paths.test.js.map