Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All files in include paths are loaded as specs #37

Closed
bartlibert opened this issue Aug 25, 2020 · 1 comment · Fixed by #39
Closed

All files in include paths are loaded as specs #37

bartlibert opened this issue Aug 25, 2020 · 1 comment · Fixed by #39

Comments

@bartlibert
Copy link

Since commit 2fba93e, all javascript files in the include paths are loaded as specs as well, not just the spec paths.

More context, my jasmine.json config is as follows:

{
    "include_paths": [
        ".",
        "spec/jsOverride"
    ],
    "spec_files": [
        "spec"
    ],
    "exclude_paths": [
        "spec/jsOverride"
    ]
}

This used to work with the older versions of jasmine, and the files in the include_paths were used to search for includes, but they were not loaded as specs. What I see now is that all js files in the include paths are also loaded as specs, which causes issues, because my "." folder includes a "node_modules" subfolder for example, which contains stuff that is only related to my dev environment and certainly is not "jasmine testable".
I tried putting "node_modules/*" in the exclude_paths, but this does not change anything.

ptomato added a commit that referenced this issue Aug 29, 2020
The include paths were being interpreted as spec paths because the -I
was in the wrong place on the command line. In order to prevent this
confusion, don't use the -I argument at all (it is weird, and is
intercepted by GJS before arg parsing) and instead pass include paths to
the subprocess using the GJS_PATH environment variable.

Closes: #37
@ptomato
Copy link
Owner

ptomato commented Aug 29, 2020

Thanks for the report. I believe #39 should fix this.

ptomato added a commit that referenced this issue Aug 29, 2020
The include paths were being interpreted as spec paths because the -I
was in the wrong place on the command line. In order to prevent this
confusion, don't use the -I argument at all (it is weird, and is
intercepted by GJS before arg parsing) and instead pass include paths to
the subprocess using the GJS_PATH environment variable.

Closes: #37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants