Skip to content
Browse files

Added isPending to System command.

  • Loading branch information...
1 parent 18697cd commit 1129ae2757bc66d16e6e1ed5851534520c704529 @quangv committed
Showing with 10 additions and 4 deletions.
  1. +10 −4 cakes.coffee
View
14 cakes.coffee
@@ -185,12 +185,18 @@ createSystem = (options)->
label = label.black.italic
# If it has a message, it's an IT, or else it's a describe.
- if typeof msg is 'function'
+ if typeof msg is 'function' # No msg, so it's a describe
callback = msg
- mocha.describe label, callback
+ msg = ''
+ [command, msg, callback] = isPending('describe', msg, callback)
else
- label += ' '+msg
- mocha.it label, callback
+ [command, msg, callback] = isPending('it', msg, callback)
+
+ if 'style' in options
+ msg = msg.cyan
+
+ label += ' '+msg
+ mocha[command] label, callback
exports.System = createSystem(['style'])

0 comments on commit 1129ae2

Please sign in to comment.
Something went wrong with that request. Please try again.