Skip to content

Instantly share code, notes, and snippets.

@jdudek
Created March 20, 2012 14:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdudek/2136360 to your computer and use it in GitHub Desktop.
Save jdudek/2136360 to your computer and use it in GitHub Desktop.
Jasmine: suite [] instead of nested describe
# suite ["shooter", "acceptance"], -> ...
# is equivalent to:
# describe "shooter", ->
# describe "acceptance", -> ...
window.suite = (names, block) ->
name = names.shift()
if names.length > 0
describe(name, -> suite(names, block))
else
describe(name, block)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment