       '''
       productType,name,variantId
       '''
-    file = '/tmp/output.csv'
-    expectedCSV =
-      """
-      productType,name,variantId
-
-
-      """
-    @export.exportDefault(template, file, false)
-    .then (result) ->
-      expect(result).toBe 'Export done.'
-      fs.readFileAsync file, {encoding: 'utf8'}
+    outputLocation = '/tmp/output.csv'
+    expectedCSV =
+      """
+      productType,name,variantId
+
+
+      """
+    @export.exportDefault(template, outputLocation, false)
+    .then (result) ->
+      expect(result).toBe 'Export done.'
+      fs.readFileAsync outputLocation, {encoding: 'utf8'}
     .then (content) ->
       expect(content).toBe expectedCSV
       done()

    '''
      productType,name,variantId,attr-lenum-n.en,attr-set-lenum-n.en
      '''
    file = '/tmp/output.csv'
    expectedCSV =
    """
      productType,name,variantId,attr-lenum-n.en,attr-set-lenum-n.en

    '''
      productType,name,variantId,attr-lenum-n.en,attr-set-lenum-n.en,žškřďťň
      '''
    outputLocation = '/tmp/output.csv'
    expectedCSV =
    """
      productType,name,variantId,attr-lenum-n.en,attr-set-lenum-n.en,žškřďťň
