-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add ddescribe, iit for exclusive suites,specs #181
Conversation
Nice work!!! I totally support this. We've been using iit and ddescribe via Jasmine JSTD adapter for over a year now and it's been a huge productivity booster. The implementation looks good to me too. |
perhaps |
I like |
the reason why we went with ddescribe and iit in the first place is that it visually looks very similar to the original, yet it's quite easy to spot because neither is an "real" word. since |
idk... |
I agree with @IgorMinar that |
I kind of like ddescribe and iit too: doesn't mean anything but doesn't have to, for it's temporary. Self-explanatory though, it's like an emphasis. In RSpec, I'm used to a custom Is it under consideration for merge? |
Yep, I would prefer But this feature is really crucial for development. Any input from core devs ? |
ddescribe runs only these exclusive suties iit runs only these exclusive specs
Ping. It's been quite a while. Anyone who tried to use iit/ddescribe with jasmine and a automatic runner like JSTD or slim-jim agrees that this is a killer feature. And even with manual (html) runner this feature increases the velocity of development. Can we get it in? Call it whatever you want, but please merge it in :-) |
It's rebased to latest master now. Anyway, for those who like this feature, here is a latest build of jasmine including this feature: |
great! jasmine developers please give it a shot to see how cool it is yourself. |
This is the same functionality as my odescribe pull request #218 - so it's not just me! This is especially great when used with an autotest runner like jsTD or Testem. |
This is totally must, for development, we use it all the time. |
Look how this problem can be solved with mocha tagging feature https://github.com/visionmedia/mocha/wiki/Tagging |
That is good but not quite as nice because to narrow the test scope you have to update 2 places: the code and the runner, whereas with xdescribe and xit, you only have to change it in one - it's all about the workflow! |
Agree, you wanna stay in your editor... |
@whitecolor the mocha tagging feature is nothing like iit and ddescribe. The tags in mocha are meant for persistent grouping of tests, while iit and ddescribe are used just for transitive grouping. This transitive grouping is used only for development and is never meant to be committed into the source repo (for example). that reminds me that names iit and ddescribe were picked not only for developer convenience, but also to make them unusual and easy to grep for in pre-submit scripts (to prevent their addition to source repo). |
+1 We have been using iit in our angularjs tests and now I come to use jasmine on a non-angularjs iit's not there. Please pull this. |
Just FYI, Mocha already has that http://visionmedia.github.com/mocha/#exclusive-tests (even though, writing extra |
Also FYI, I wrote a blog post on this a short while ago :) http://tobyho.com/2012/09/12/better-tdd-workflow-via-exclusive-tests-in-jasmine-and-mocha/ |
I still use "x" to exclude tests, adding and removing ".skip" is too tiresome. |
+100 I wonder why this one wasn't considered / merged... |
Given that this feature has been already used and found useful on a bunch of projects, I +1 it |
I feel there is a touch too much cognitive overhead with the syntax as it stands. |
@anthonygreen command line args take too long to set up and require context switching (from editor to command line) for every test run. this is what we are trying to avoid. |
@anthonygreen just wanted to say that I'm using syntax proposed by @vojtajina on the daily basis and I'm absolutely loving it. It might look odd at first but works perfectly in practice. It is huge, huge time-saver. |
@IgorMinar I disagree. Context switching is generally low and I've observed that the test community already handles it with various solutions in the case of Cucumber. |
Great that karma has this. Surprised that jasmine does not. +1 |
As Jasmine v2.0 is coming, I really think we should get this in. I'm happy to update this PR. |
+1 |
I will be happy to see this feature in the upcoming release so +1! |
+1 |
2 similar comments
+1 |
+1 |
+1 There is already a grunt task to verify you don't accidentally commit this: https://github.com/btford/grunt-ddescribe-iit |
+1 On Thu, Jul 11, 2013 at 6:29 AM, Pascal Hartig notifications@github.comwrote:
|
+1 |
1 similar comment
+1 |
The sooner, the better! |
+1 use this every day in Karma |
+1 |
1 similar comment
+1 |
I am closing this request. We are going to support this functionality in some manner in 2.0 - it's clearly important to people. However this pull's implementation is not relevant for the 2.0 implementation. There is an active discussion on the mailing list for the approach. |
For newcomers to this issue - was this something implemented in Jasmine 2.0 or has it not yet landed? |
+1 |
|
@nikku Yes, this has been patched by the Angular team into the version of Jasmine that ships with Karma. So, if you are using the karma runner, you will have access to Answering my own question - this feature isn't available in core Jasmine. I'm using jasmine-node to unit test my server side code and it would be really nice to have |
For those interested, I've created https://github.com/mwise/jasmine-focus to add a psuedo-plugin that you can use to run focused specs. It supports fdescribe and fit, as well as an rspec-style { focus: true } tag object optionally passed as the first argument to describe() and fit(). We're using it in a rails context by specifying a custom boot.js that incorporates the jasmine-focus stuff. Not ideal, but it works! |
For anyone that found this thread and looking for if this was implemented: |
When any ddescribe is registered, only specs withing these exclusive suites will be run
When any iit is registered, only these exclusive specs will be run (precedence over ddescribe)
We've been using this feature for quit a while during development of AngularJS.
It's part of Jasmine - JsTD adapter, I think it was originally an idea of @IgorMinar.
I really miss this feature when using jasmine-node or when using SlimJim.
I think, it really should be part of the core, so I did implement it.