Giter Site home page Giter Site logo

Problem excluding files about jasmine-npm HOT 4 CLOSED

3nriqu390 avatar 3nriqu390 commented on July 18, 2024
Problem excluding files

from jasmine-npm.

Comments (4)

sgravrock avatar sgravrock commented on July 18, 2024

Something like this should do what you want:

{
  "spec_dir": "./src/client",
  "spec_files": [
    "**/*.spec.ts",
    "!**/node_modules/**"
  ],
  "helpers": ["../tests/helpers/**/*.js"]
} 

from jasmine-npm.

3nriqu390 avatar 3nriqu390 commented on July 18, 2024

Something like this should do what you want:

{
  "spec_dir": "./src/client",
  "spec_files": [
    "**/*.spec.ts",
    "!**/node_modules/**"
  ],
  "helpers": ["../tests/helpers/**/*.js"]
} 

Already tried it, and also giving the route relative to the specific node modules folder with the issue. It doesn't work, the only thing i can think is that the global project and the specific project with the issue have a different node js version. Could this have an impact in the exclude??

from jasmine-npm.

sgravrock avatar sgravrock commented on July 18, 2024

the global project and the specific project with the issue have a different node js version. Could this have an impact in the exclude??

No, but that could be another problem: Jasmine runs in the version of Node that you use to invoke it. If you're fine with all your tests running in the same version of Node, the setup you're describing could work for you. But if you need tests in different subprojects to run in different versions of Node, you'll need to invoke Jasmine separately for each one. And at that point you could sidestep the exclude problem by having a separate config file for each subproject.

Most likely, the problem is that the exclude glob doesn't match the actual paths you're trying to exclude. I tried it out locally and it works for paths like src/client/example-folder-1/node_modules/foo/bar/foo.spec.ts, but maybe your paths are different in some important way.

There's not really enough for me to go on here. Something about your setup is different than what I'm doing, and I don't know what it is. But I can take another look if you provide exact working steps to reproduce or a repo containing a minimal reproducible example.

from jasmine-npm.

sgravrock avatar sgravrock commented on July 18, 2024

Closing due to inactivity. Feel free to open a new issue if you still need help and you're able to provide a reliable way for me to reproduce the problem.

from jasmine-npm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.