diff --git a/README.md b/README.md index 84be08b..3962476 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ it('should work', function() { ``` -Now, if you take that "it" prefix, and replace it with "iit", instead of +Now, if you take that "it" prefix, and replace it with "fit", instead of running your entire suite, it will run JUST THAT ONE SPEC. There are probably bad reasons to want to do this, like if your build is broken and you want to ignore the failures, but it can be pretty handy to @@ -121,7 +121,7 @@ or the "run spec" mapping: rs -will toggle the spec between "it" and "iit." This works especially well if +will toggle the spec between "it" and "fit." This works especially well if you have a karma watch going, as shown in the [screencast][screencast]. You are able to do the same with a describe block using the run block command: @@ -132,6 +132,14 @@ or the corresponding mapping: rb +If you're running jasmine 1 instead of jasmine 2, you will need to use iit and +ddescribe instead of fit and fdescribe. To make that happen, tell vim-angular +that you are using jasmine 1 in your .vimrc like this: + +``` +let g:angular_jasmine_version = 1 +``` + ### Syntastic syntax checker customization You know how you use syntastic to check your syntax as you edit, because diff --git a/doc/angular.txt b/doc/angular.txt index 80a48b3..e38c785 100644 --- a/doc/angular.txt +++ b/doc/angular.txt @@ -55,14 +55,16 @@ have a karma watch going. Wut, you don't use karma watch? Dude! *angular-:AngularRunSpec* :AngularRunSpec Updates the spec where your cursor is sitting from - "it" to "iit" and writes the file. Why? Jasmine - notices that you have an iit spec, and, when you run - your test suite, it will only run that one spec. If - the spec is already "focused" (with "iit"), running - this command will toggle it back to "it." All of this - is much more effective if you have karma watching your - files and running your tests automatically when you - save files. + "it" to "fit" (the f stands for focus) and writes the + file. Why? Jasmine notices that you have a fit spec, + and, when you run your test suite, it will only run + that one spec. If the spec is already "focused" (with + "fit"), running this command will toggle it back to + "it." All of this is much more effective if you have + karma watching your files and running your tests + automatically when you save files. If you are using + jasmine 1, you need to specify iit instead of fit, + so set g:angular_jasmine_version = 1 in your .vimrc. *angular-:AngularRunSpecBlock* :AngularRunSpecBlock Perform the same dance as :AngularRunSpec but using the