/* global describe:true, it:true, before:true, beforeEach:true, afterEach:true, after:true */
import assert from 'assert';
import { contains } from 'lodash';
import { setupTestRekapi, setupTestActor } from './test-utils';

import Rekapi, { DOMRenderer } from '../src/main';
import {
  Tweenable,
  interpolate,
  setBezierFunction,
  unsetBezierFunction
} from 'shifty';

describe('DOMRenderer#toString', () => {
  const { cssRenderer } = Rekapi._private;
  let rekapi, actor, actor2;

  beforeEach(() => {
    rekapi = setupTestRekapi(document.createElement('div'));
    actor = setupTestActor(rekapi);
  });

  describe('private helper methods', () => {
    let vendorBoilerplates;

    afterEach(() => {
      vendorBoilerplates = undefined;
    });

    describe('applyVendorBoilerplates', () => {
      it('applies boilerplate for W3 by default', () => {
        vendorBoilerplates =
          cssRenderer.applyVendorBoilerplates('KEYFRAMES', 'NAME');

        assert.equal(
          vendorBoilerplates,
          ['@keyframes NAME-keyframes {',
          'KEYFRAMES',
          '}'].join('\n')
        );
      });
    });

    it('applies boilerplate for other vendors', () => {
      vendorBoilerplates = cssRenderer.applyVendorBoilerplates(
        'KEYFRAMES', 'NAME',
        ['w3', 'webkit']
      );

      assert.equal(
        vendorBoilerplates,
        ['@keyframes NAME-keyframes {',
        'KEYFRAMES',
        '}',
        '@-webkit-keyframes NAME-keyframes {',
        'KEYFRAMES',
        '}'].join('\n')
      );
    });
  });
});

@@ -1115,25 +1115,19 @@
     %7D);%0A
+%0A
   
-  %7D);%0A%0A
     it('
@@ -1166,32 +1166,34 @@
 ndors', () =%3E %7B%0A
+  
       vendorBoil
@@ -1240,32 +1240,34 @@
 plates(%0A        
+ 
+ 
 'KEYFRAMES', 'NA
@@ -1271,16 +1271,18 @@
 'NAME',%0A
+  
         
@@ -1304,16 +1304,18 @@
 %5D%0A      
+  
 );%0A%0A    
@@ -1312,24 +1312,26 @@
   );%0A%0A      
+ 
+ 
 assert.equal
@@ -1324,32 +1324,34 @@
   assert.equal(%0A
+  
         vendorBo
@@ -1354,32 +1354,34 @@
 orBoilerplates,%0A
+  
         %5B'@keyfr
@@ -1404,32 +1404,34 @@
 mes %7B',%0A        
+  
 'KEYFRAMES',%0A   
@@ -1439,13 +1439,17 @@
     
+  
 '%7D',%0A
+  
     
@@ -1491,32 +1491,34 @@
 mes %7B',%0A        
+  
 'KEYFRAMES',%0A   
@@ -1506,32 +1506,34 @@
    'KEYFRAMES',%0A
+  
         '%7D'%5D.joi
@@ -1542,24 +1542,36 @@
 '%5Cn')%0A      
+ 
+ );%0A      %7D
 );%0A    %7D);%0A 

Fix test organization