Skip to content

Commit d1b1bea

Browse files
committed
Add node_modules to ignore list
1 parent 9da41ed commit d1b1bea

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

bin/helpers/archiver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const archiveSpecs = (runSettings, filePath) => {
3737

3838
let allowedFileTypes = [ 'js', 'json', 'txt', 'ts' ]
3939
allowedFileTypes.forEach(fileType => {
40-
archive.glob(`**/*.${fileType}`, { cwd: cypressFolderPath, matchBase: true });
40+
archive.glob(`**/*.${fileType}`, { cwd: cypressFolderPath, matchBase: true, ignore: 'node_modules/**' });
4141
});
4242

4343
archive.finalize();

bin/helpers/capabilityHelper.js

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -70,49 +70,10 @@ const validate = (bsConfig) => {
7070

7171
if(!bsConfig.run_settings.cypress_proj_dir) reject(Constants.validationMessages.EMPTY_SPEC_FILES);
7272

73-
if(invalidFiles(bsConfig.run_settings.cypress_proj_dir)) reject(Constants.validationMessages.INVALID_EXTENSION);
74-
7573
resolve(Constants.validationMessages.VALIDATED);
7674
});
7775
}
7876

79-
const invalidFiles = (testFolder)=> {
80-
var options = {
81-
dot: true
82-
}
83-
files = glob.sync(testFolder + "/**/*", options)
84-
var invalidFiles = []
85-
files.forEach(file => {
86-
if(isHiddenPath(file) || invalidExtension(file)){
87-
invalidFiles.push(file)
88-
}
89-
});
90-
91-
if(invalidFiles.length > 0) {
92-
logger.log("These files are not valid: " + invalidFiles.toString())
93-
return true
94-
} else {
95-
return false
96-
}
97-
}
98-
99-
var isHiddenPath = (path) => {
100-
return (/(^|\/)\.[^\/\.]/g).test(path);
101-
};
102-
103-
var invalidExtension = (file) => {
104-
let ext = file.split('.').pop();
105-
if (isFile(file) && !["js", "json", "txt"].includes(ext)) {
106-
return true;
107-
}
108-
109-
return false;
110-
}
111-
112-
var isFile = (path) => {
113-
return path.split('/').pop().indexOf('.') > -1;
114-
}
115-
11677
module.exports = {
11778
caps,
11879
validate

0 commit comments

Comments
 (0)