Running specific CoffeeScript specs doesn't work #20

Closed
opened 2011-06-20 04:47:17 +00:00 by mcmire · 9 comments
mcmire commented 2011-06-20 04:47:17 +00:00 (Migrated from github.com)

Found another boog. Running jasmine-headless-webkit without any arguments works fine with CoffeeScript files now, so that's great, but running a specific CoffeeScript file doesn't quite work -- it not only ends up running all the specs as though you didn't pass an argument, but also prints "PASS: 0 tests, 0 failures, 0 secs." at the top of the output, even if there are test failures (in which case there's also a "FAIL" line at the bottom). Specifying specific Javascript files, however, works fine.

I can investigate this further tomorrow but I wanted to just jot this down now.

Found another boog. Running `jasmine-headless-webkit` without any arguments works fine with CoffeeScript files now, so that's great, but running a specific CoffeeScript file doesn't quite work -- it not only ends up running all the specs as though you didn't pass an argument, but also prints "PASS: 0 tests, 0 failures, 0 secs." at the top of the output, even if there are test failures (in which case there's also a "FAIL" line at the bottom). Specifying specific Javascript files, however, works fine. I can investigate this further tomorrow but I wanted to just jot this down now.
johnbintz commented 2011-06-20 10:39:05 +00:00 (Migrated from github.com)

What is the directory structure of the working directory and the exact command line you're running the executable with?

What is the directory structure of the working directory and the exact command line you're running the executable with?
mcmire commented 2011-06-22 16:48:13 +00:00 (Migrated from github.com)

Sorry for the delay on this. I currently have it so that I'm converting the CoffeeScript files into Javascript, and then I have the Javascript files listed in jasmine.yml. This is so that I can run the specs either using JHW or the regular Jasmine gem. That is working for me for right now, hence the delay. But anyway, I have a spec/javascripts folder and also a spec/coffeescripts folder. I've been using guard-jasmine-headless-webkit, but I just run jasmine-headless-webkit spec/coffeescripts/some_spec.coffee then I still get the weird PASS/FAIL thing.

Sorry for the delay on this. I currently have it so that I'm converting the CoffeeScript files into Javascript, and then I have the Javascript files listed in jasmine.yml. This is so that I can run the specs either using JHW or the regular Jasmine gem. That is working for me for right now, hence the delay. But anyway, I have a spec/javascripts folder and also a spec/coffeescripts folder. I've been using guard-jasmine-headless-webkit, but I just run `jasmine-headless-webkit spec/coffeescripts/some_spec.coffee` then I still get the weird PASS/FAIL thing.
johnbintz commented 2011-06-22 16:55:28 +00:00 (Migrated from github.com)

So just to clarify, jasmine.yml is roughly:

spec_dir: spec/javascripts
spec_files: [ "**/*_spec.js" ]

Correct?

So just to clarify, `jasmine.yml` is roughly: ``` yaml spec_dir: spec/javascripts spec_files: [ "**/*_spec.js" ] ``` Correct?
mcmire commented 2011-06-22 20:14:33 +00:00 (Migrated from github.com)

Yes, exactly.

Yes, exactly.
johnbintz commented 2011-06-22 20:45:15 +00:00 (Migrated from github.com)

Well the issue you're running into is that the "run specific spec file" looks within the scope of what files jasmine.yml sees. So, since you don't include any *.coffee files, it won't find the *.coffee file you're requesting.

I suppose that, theoretically, since your helpers and stuff should be defined in the helpers part of jasmine.yml, one could simply replace spec_files for that run with whatever file(s) you pass in, and everything should work. (Right now, it's actually a little too convoluted with regards to spec file filtering, so this may be an opportunity to clean that up.) What do you think of that approach?

Well the issue you're running into is that the "run specific spec file" looks within the scope of what files `jasmine.yml` sees. So, since you don't include any `*.coffee` files, it won't find the `*.coffee` file you're requesting. I suppose that, theoretically, since your helpers and stuff should be defined in the `helpers` part of `jasmine.yml`, one could simply replace `spec_files` for that run with whatever file(s) you pass in, and everything should work. (Right now, it's actually a little too convoluted with regards to spec file filtering, so this may be an opportunity to clean that up.) What do you think of that approach?
mcmire commented 2011-06-22 20:54:28 +00:00 (Migrated from github.com)

True, you would want to run all the helpers, wouldn't you. Yup, that approach makes sense to me.

True, you _would_ want to run all the helpers, wouldn't you. Yup, that approach makes sense to me.
johnbintz commented 2011-06-22 21:29:31 +00:00 (Migrated from github.com)

Cool, then I'll rework the file list search and tag the commits with this issue so you should get notified when it's ready. Shouldn't take long, provided I don't get busy.

Cool, then I'll rework the file list search and tag the commits with this issue so you should get notified when it's ready. Shouldn't take long, provided I don't get busy.
johnbintz commented 2011-06-23 13:38:34 +00:00 (Migrated from github.com)

D'oh, I totally forgot to tag the commits for this. Here it is: c359e8b28b

D'oh, I totally forgot to tag the commits for this. Here it is: c359e8b28bfff40ffa9b
mcmire commented 2011-06-23 15:52:12 +00:00 (Migrated from github.com)

Sweet. Looks like that's working with my project. So thanks again!

Sweet. Looks like that's working with my project. So thanks again!
Sign in to join this conversation.
No Label
bug
doc
feature
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/jasmine-headless-webkit#20
No description provided.