import chai from 'chai';
import { baseDir, packageJson, cwd } from '../utils/variables';
import { sanitizeString } from '../utils/functions';

const assert = chai.assert;
const expect = chai.expect;

describe('Riko Test Suite', () => {
    describe('variables', () => {
        describe('baseDir', () => {
            it('should exist and be truthy', () => {
                assert.isOk(baseDir);
                expect(baseDir).to.be.a('string');
            });
        });
        describe('packageJson', () => {
            it('should exist and be truthy', () => {
                assert.isOk(packageJson);
                expect(packageJson).to.be.an('object');
            });
        });
        describe('cwd', () => {
            it('should exist and be truthy', () => {
                assert.isOk(cwd);
                expect(cwd).to.be.a('string');
            });
        });
    });

    describe('functions', () => {
        describe('sanitizeString', () => {
            it('should exist and be truthy', () => {
                assert.isOk(sanitizeString);
                expect(sanitizeString).to.be.a('function');
            });
            it('should return non escaped quotes', () => {
                assert.equal(sanitizeString('Ddf/\"'), 'Ddf/"');
            });
        });
    });
});
@@ -31,35 +31,54 @@
 t %7B 
-baseDir, packageJson, cwd %7D
+forEach %7D from 'lodash';%0Aimport * as variables
  fro
@@ -124,16 +124,31 @@
 zeString
+, hasWhiteSpace
  %7D from 
@@ -301,48 +301,8 @@
 %3E %7B%0A
-        describe('baseDir', () =%3E %7B%0A    
     
@@ -308,32 +308,36 @@
      it('should 
+all 
 exist and be tru
@@ -354,35 +354,57 @@
 %3E %7B%0A            
-   
+forEach(variables, (v) =%3E
  assert.isOk(bas
@@ -400,23 +400,18 @@
 rt.isOk(
-baseDir
+v)
 );%0A     
@@ -417,78 +417,54 @@
     
-        expect(baseDir).to.be.a('string');%0A            %7D);%0A        %7D);
+%7D);%0A    %7D);%0A%0A    describe('functions', () =%3E %7B
 %0A   
@@ -478,27 +478,30 @@
 scribe('
-packageJson
+sanitizeString
 ', () =%3E
@@ -584,27 +584,30 @@
 rt.isOk(
-packageJson
+sanitizeString
 );%0A     
@@ -628,37 +628,181 @@
 ect(
-packageJson).to.be.an('object
+sanitizeString).to.be.a('function');%0A            %7D);%0A            it('should return non escaped quotes', () =%3E %7B%0A                assert.equal(sanitizeString('Ddf/%5C%22'), 'Ddf/%22
 ');%0A
@@ -847,19 +847,29 @@
 scribe('
-cwd
+hasWhiteSpace
 ', () =%3E
@@ -952,19 +952,29 @@
 rt.isOk(
-cwd
+hasWhiteSpace
 );%0A     
@@ -995,11 +995,21 @@
 ect(
-cwd
+hasWhiteSpace
 ).to
@@ -1019,14 +1019,16 @@
 .a('
-string
+function
 ');%0A
@@ -1055,253 +1055,276 @@
     
-%7D);%0A    %7D);%0A%0A    describe('functions', () =%3E %7B%0A        describe('sanitizeString', () =%3E %7B%0A            it('should exist and be truthy', () =%3E %7B%0A                assert.isOk(sanitizeString);%0A                expect(sanitizeString).to.be.a('function'
+    it('should return true if string has white space', () =%3E %7B%0A                assert.equal(hasWhiteSpace('has white space'), true);%0A                assert.equal(hasWhiteSpace('haswhitespace '), true);%0A                assert.equal(hasWhiteSpace(' haswhitespace'), true
 );%0A 
@@ -1368,34 +1368,61 @@
  return 
-non escaped quotes
+false if string has does not have white space
 ', () =%3E
@@ -1457,41 +1457,45 @@
 ual(
-sanitizeString('Ddf/%5C%22'), 'Ddf/%22'
+hasWhiteSpace('haswhitespace'), false
 );%0A 

update tests