-
Notifications
You must be signed in to change notification settings - Fork 4
A set of snippets for the Jasmine JavaScript BDD Framework
vim-scripts/Jasmine-snippets-for-snipMate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a mirror of http://www.vim.org/scripts/script.php?script_id=3249 Jasmine (http://pivotal.github.com/jasmine/) is a behavior-driven-development framework for JavaScript with some very nice features. This set of snipMate snippets aims to make developing tests with Jasmine quicker and easier. For example, rather than typing out the full: "description('Description Here', function() {});" You can type "des<TAB>". This will create the full description block, with convenient tab stops. Tre magnifique! List of Included Snippets (this is actually just the file): # After Each snippet aft afterEach(function() { ${1} } # Any snippet any jasmine.any(${1}) # Before Each snippet bef beforeEach(function() { ${1} }); # Describe snippet des describe("${1:description}", function() { ${2} });${3} # Expect not to be defined snippet notd expect(${1:target}).not.toBeDefined();${2} # Expect not to be falsy snippet notf expect(${1:target}).not.toBeFalsy();${2} # Expect not to be null snippet notn expect(${1:target}).not.toBeNull();${2} # Expect to be truthy snippet nott expect(${1:target}).not.toBeTruthy();${2} # Expect not to contain snippet notc expect(${1:target}).not.toContain(${2:value});${3} # Expect not to equal snippet note expect(${1:target}).not.toEqual(${2:value});${3} # Expect not to match snippet notm expect(${1:target}).not.toBeDefined();${2} # Expect not snippet notx expect(${1:target}).not;${2} # Expect to be defined snippet ed expect(${1:target}).toBeDefined();${2} # Expect to be falsy snippet ef expect(${1:target}).toBeFalsy();${2} # Expect to be null snippet en expect(${1:target}).toBeNull();${2} # Expect to be truthy snippet et expect(${1:target}).toBeTruthy();${2} # Expect to contain snippet ec expect(${1:target}).toContain(${2:value});${3} # Expect to equal snippet ee expect(${1:target}).toEqual(${2:value});${3} # Expect to match snippet em expect(${1:target}).toMatch(${2:pattern});${3} # Expect was called with snippet escw expect(${1:target}).wasCalledWith(${2:arguments});${3} # Expect was called snippet esc expect(${1:target}).wasCalled();${2} # Expect was not called with snippet notscw expect(${1:target}).wasNotCalledWith(${2:arguments});${3} # Expect was not called snippet notsc expect(${1:target}).wasNotCalled();${3} # Expect snippet ex expect(${1:target});${2} # It snippet it it("${1:description}", function() { ${2} });${3} # Runs snippet ru runs(function() { ${1} });${2} # Spy on and call fake snippet scf spyOn(${1:object}, "${2:method}").andCallFake(${3:function});${4} # Spy on and call through snippet sct spyOn(${1:object}, "${2:method}").andCallThrough();${3} # Spy on and return snippet sr spyOn(${1:object}, "${2:method}").andReturn(${3:arguments});${4} # Spy on and throw snippet st spyOn(${1:object}, "${2:method}").andThrow(${3:exception});${4} # Spy on snippet s spyOn(${1:object}, "${2:method}");${3} # Waits (wa) snippet wa waits(${1});${2}
About
A set of snippets for the Jasmine JavaScript BDD Framework
Resources
Stars
Watchers
Forks
Packages 0
No packages published