File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,13 @@ func IsInTestFolder(path string, testsPath string) bool {
6262 return IsCommonTestFolder (path )
6363 }
6464
65- if strings .Contains (path , string (os .PathSeparator )+ testsPath ) {
65+ // At this point, `testsPath` may have a value like this: "sample-node-project/test".
66+ // Thus, we want to do 2 things:
67+ // - Exclude this folder itself, i.e. check for a path that ends with "sample-node-project/test"
68+ // - Exclude any file in it, i.e. check for path that contains "sample-node-project/test/"
69+ fileInTestFolderPath := testsPath + string (os .PathSeparator )
70+
71+ if strings .HasSuffix (path , testsPath ) || strings .Contains (path , fileInTestFolderPath ) {
6672 if ! didPrintTestsMsg {
6773 log .Info ("\t Ignoring the entire content of the `" + testsPath + "` folder (contains test files)" )
6874 didPrintTestsMsg = true
You can’t perform that action at this time.
0 commit comments