   throw err if err
   null
 
+# Given two values are not identical, create a nested
+# diff of the two objects, which can handle both arrays and
+# objects.
+#
+# TODO: this doesn't work right when 'actual' and 'expected'
+#       are not the same type, i.e. object vs string.
 diff_message = (expected, actual, prefix='    ') ->
   if _.isArray expected
     array_diff_message expected, actual, prefix

  else
    finish_tests()

finish_tests = ->
  report()
  db.end()

  throw err if err
  obj

# Set a key into the database (after packing it). Commonly would
# be called from a `setup` block.
set = (args..., value) ->
  key = args.join ':'
  prefix = key.split(':')[0]
