0

I've written 3 spec files, each of them is designed for separate modules. The folder structure is:

|-spec
  |-module1.spec.js
  |-module2.spec.js
  |-module3.spec.js

Command jasmine-node --teamcity spec/ somehow runs only for the first module1.spec.js file and skips the rest files.

Could anyone explain what could cause such a behavior?

MBielski
  • 6,628
  • 3
  • 32
  • 43
Ostap Lisovyj
  • 180
  • 2
  • 17
  • Not without seeing the conf file. – MBielski Sep 04 '15 at 14:20
  • The documentation for [jasmine-node](https://github.com/mhevery/jasmine-node) says nothing about some special configuration, the default is to `write the specifications for your code in *.js and *.coffee files in the spec/ directory.` – Ostap Lisovyj Sep 04 '15 at 14:34
  • Looks like it is a known issue: https://github.com/mhevery/jasmine-node/issues/378 (If you are the issue owner, please accept my apologies for referencing something you already knew about.) – MBielski Sep 04 '15 at 14:56
  • Are you on Windows? (In other words, does that issue apply to you?) Other things to add to the info: if you rename the files so #2 is first, is it still skipped? Or is it run and the other two skipped? FWIW, I do not see this behavior. – Jordan Kasper Sep 04 '15 at 15:03
  • @jakerella Yes, I use Windows and the behavior is the same if I rename files - all except the first spec are skipped – Ostap Lisovyj Sep 07 '15 at 10:12
  • Adding to my previous comment: I've figured out what was causing the problem - every spec file initiated it's own `var app = express()`. The problem was that I've set `app.listen(8001);` to the same port for every spec. Changing different ports for each spec fixes the issue – Ostap Lisovyj Sep 07 '15 at 10:51
  • Good to hear it's fixed! You should add an answer for your own question and accept it! – Jordan Kasper Sep 07 '15 at 21:13

1 Answers1

0

I've figured out what was causing the problem - every spec file initiated it's own var app = express(). The problem was that I've set app.listen(8001); to the same port for every spec. Changing different ports for each spec fixes the issue

Ostap Lisovyj
  • 180
  • 2
  • 17