Skip to content

Commit

Permalink
docs for g:angular_jasmine_version (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
burnettk committed Apr 22, 2015
1 parent 15798c5 commit 72999fa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -121,7 +121,7 @@ or the "run spec" mapping:

<leader>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:
Expand All @@ -132,6 +132,14 @@ or the corresponding mapping:

<leader>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
Expand Down
18 changes: 10 additions & 8 deletions doc/angular.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72999fa

Please sign in to comment.