 
           if typeof test.throws is 'string'
             if typeof error isnt 'string'
-              throw """
+              throw new Error """
                 THIS SHOULD NOT HAPPEN --- #{error}
 
                 #{JSON.stringify(schema, null, 2)}

            try
              expect(sample).toHaveSchema schema, refs
            catch e
              throw """
                #{suite.description} (#{e})

                #{JSON.stringify(schema, null, 2)}

  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) ->
    describe "#{suite.description} (#{file.replace(__dirname + '/', '')})", ->
      suite.tests.forEach (test) ->
        it test.description, ->
