jasmine / jasmine-npm

A jasmine runner for node projects.
MIT License
376 stars 145 forks source link

Unable to find specs when using glob@7.2.2 #194

Closed AaronSterlingGENEICD closed 2 years ago

AaronSterlingGENEICD commented 2 years ago

Glob pushed an update two days ago, from 7.2.0 to 7.2.2. This broke our test suites. I don't know whether it is a glob issue or a jasmine issue, but I figure you'd want to know.

Change of behavior: goes from working fine, to reporting No Specs Found.

When we forced revert to glob@7.2.0, everything worked again. We noticed this in jasmine 4, downgraded to jasmine 3 and continued to have the problem, then opened the dependency tree and reverted glob.

Possibly relevant: we are using ESM modules, no CommonJS.

jasmine.json

{ "spec_dir": "spec", "spec_files": ["../build/**/*[sS]pec.?(m)js"], "helpers": ["helpers/**/*.?(m)js"], "stopSpecOnExpectationFailure": false, "random": true, "jsLoader": "import" }

Excerpts from npm ls --long --all

Below config reports No specs found `+-- jasmine@3.99.0 +-- glob@7.2.2
+-- fs.realpath@1.0.0
+-- inflight@1.0.6
+-- once@1.4.0 deduped
`-- wrappy@1.0.2
+-- inherits@2.0.4
+-- minimatch@3.1.2 deduped
+-- once@1.4.0
`-- wrappy@1.0.2 deduped
`-- path-is-absolute@1.0.1
-- jasmine-core@3.99.1
Below config works fine `+-- jasmine@3.99.0 +-- glob@7.2.0
+-- fs.realpath@1.0.0
+-- inflight@1.0.6
+-- once@1.4.0 deduped
`-- wrappy@1.0.2
+-- inherits@2.0.4
+-- minimatch@3.1.2 deduped
+-- once@1.4.0
`-- wrappy@1.0.2 deduped
`-- path-is-absolute@1.0.1
-- jasmine-core@3.99.1

Same dependency tree except with jasmine at version 4 has the same problem.

AaronSterlingGENEICD commented 2 years ago

Apologies, I think I opened this in the wrong place. I put a duplicate here: https://github.com/jasmine/jasmine/issues/1970#issue-1236201037

isaacs commented 2 years ago

Should be fixed by glob@7.2.3. If it isn't, please post a new issue at https://github.com/isaacs/node-glob/issues, ideally with a reproduction case. Thanks!