             throw e unless test.throws
 
           if test.dump
-            console.log JSON.stringify(sample, null, 2)
+            console.log 'IN', JSON.stringify(schema, null, 2)
+            console.log 'OUT', JSON.stringify(sample, null, 2)
             return
 
           if test.hasNot

  obj = obj[parts.shift()] while parts.length
  obj

argv = process.argv.slice(2)
spec = argv.indexOf('--spec')
spec = unless spec is -1
  argv[spec + 1]
else
  null

glob.sync("#{__dirname}/**/*.json").forEach (file) ->
  if spec isnt null
    return if file.indexOf(spec) is -1

  suite = JSON.parse(fs.readFileSync(file))

  (if Array.isArray(suite) then suite else [suite]).forEach (suite) ->
    return if suite.xdescription

    describe "#{suite.description} (#{file.replace(__dirname + '/', '')})", ->
      suite.tests.forEach (test) ->
        return if test.xdescription


fs = require('fs')
glob = require('glob')
jsfaker = require('../')
