       script = 'module.exports = {' + functions.join(',') + '}'
       moduleObj = funcster._generateModule(script)
       (() -> moduleObj[obj]()).should.throw /is not defined/ for obj in objects
-      done()
-
-    it 'should have falsy values for global, modules and exports when using standard template', (done) ->
-      objects = [ 'global', 'module', 'exports' ]
+
+    it 'should have falsy values for modules and exports when using standard template', () ->
+      objects = [ 'module', 'exports' ]
       functions = {}
       functions[obj] = "function() { return !#{obj}; }" for obj in objects
       script = funcster._generateModuleScript(functions)
       moduleObj = funcster._generateModule(script)
       moduleObj[obj]().should.eql true for obj in objects
-      done()
-
-    it 'should define standard global values', (done) ->
+
+    it 'should define standard global values', () ->
       objects = [ 'Object', 'Array', 'String', 'Date', 'Function' ]
       functions = {}
       functions[obj] = "function() { return !!#{obj}; }" for obj in objects
       script = funcster._generateModuleScript(functions)
       moduleObj = funcster._generateModule(script)
       moduleObj[obj]().should.eql true for obj in objects
-      done()
-
-    it 'instanceof operator fails by default', (done) ->
+
+    it 'instanceof operator fails by default', () ->
       objects = [ 'Object', 'Array', 'String', 'Date', 'Function' ]
       functions = {}
       functions[obj] = "function(arg) { return arg instanceof #{obj}; }" for obj in objects


  describe 'serialize()', () ->

    before (done) ->
      @testFunc = (arg) -> "Hello #{arg}!"
      @serializedTestFunc = funcster.serialize(@testFunc)
      done()

    it 'should wrap a function in an object', (done) ->
      _.keys(@serializedTestFunc).should.eql [ '__js_function' ]
      done()

    it 'should serialize the function to a string', (done) ->
      @serializedTestFunc.__js_function.should.eql @testFunc.toString()
      done()

    it 'should allow for custom serialization markers', (done) ->
      serialzed = funcster.serialize(@testFunc, 'CUSTOM_MARKER')
      _.keys(serialzed).should.eql [ 'CUSTOM_MARKER' ]
      done()

  describe 'deepSerialize()', () ->

    before (done) ->
      @original =
        arr: [
          (arg) -> "Hello #{arg}!"

      (@deserialized.arr[3] != @original.arr[3]).should.eql true
      (@deserialized.arr[4].foobar != @original.arr[4].foobar).should.eql true
      (@deserialized.obj.a[0].b.c != @original.obj.a[0].b.c).should.eql true

    it 'should preserve the original structure', () ->
      @deserialized.arr[1].should.eql @original.arr[1]
      @deserialized.obj.z.should.eql @original.obj.z