From 760bb0eab572493deba1471bc37333d4bb217fd0 Mon Sep 17 00:00:00 2001 From: "Christopher H. Laco" Date: Mon, 31 Jan 2011 22:37:53 -0500 Subject: [PATCH] Added spy/expect snippets Added more keywords --- snippets/expect.snippet | 1 + snippets/spy.snippet | 1 + syntax/jasmine.vim | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 snippets/expect.snippet create mode 100644 snippets/spy.snippet diff --git a/snippets/expect.snippet b/snippets/expect.snippet new file mode 100644 index 0000000..858e104 --- /dev/null +++ b/snippets/expect.snippet @@ -0,0 +1 @@ +expect( ${1} ).to${2}(); diff --git a/snippets/spy.snippet b/snippets/spy.snippet new file mode 100644 index 0000000..6c13f63 --- /dev/null +++ b/snippets/spy.snippet @@ -0,0 +1 @@ +spyOn( ${1:object}, '${2:method}' ); diff --git a/syntax/jasmine.vim b/syntax/jasmine.vim index 097d1de..112164c 100644 --- a/syntax/jasmine.vim +++ b/syntax/jasmine.vim @@ -6,9 +6,17 @@ runtime! syntax/javascript.vim syn case match syn keyword specFunctions afterEach beforeEach describe it expect addMatchers spyOn not +syn keyword specDisabled xit xdescribe +syn keyword specSpys andCallThrough andReturn andThrow andCallFake callCount argsForCall mostRecentCall +syn keyword specAsync runs waits waitsFor syn match specMatcher "to[A-Za-z0-9_]*" +syn keyword specjQuery loadFixtures readFixtures setFixtures sandbox clearCache cleanUp hi def link specFunctions Special +hi def link specDisabled Error hi def link specMatcher Special +hi def link specSpys Special +hi def link specAsync Special +hi def link specjQuery Special let b:current_syntax = "jasmine"