Repository: pactumjs/pactum
Pull request #72 (2021-06-06 12:07:44)

3.0.16
- Support Cookies
- Support Additional Log Levels
- Introducing Plugins


Patch:
diff --git a/package-lock.json b/package-lock.json
index 2a4caf3..1efc3bf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "pactum",
-  "version": "3.0.15",
+  "version": "3.0.16",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
diff --git a/package.json b/package.json
index 9585bab..66a720a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "pactum",
-  "version": "3.0.15",
+  "version": "3.0.16",
   "description": "REST API Testing Tool for all levels in a Test Pyramid",
   "main": "./src/index.js",
   "types": "./src/index.d.ts",
@@ -37,7 +37,6 @@
     "cucumber",
     "mocha",
     "jest",
-    "fake",
     "mock",
     "server",
     "JSON",
diff --git a/src/helpers/compare.js b/src/adapters/json.like.js
similarity index 76%
rename from src/helpers/compare.js
rename to src/adapters/json.like.js
index 216d4d4..51a9ce2 100644
--- a/src/helpers/compare.js
+++ b/src/adapters/json.like.js
@@ -1,22 +1,13 @@
 const config = require('../config');
-const log = require('../exports/logger').get();
 const handler = require('../exports/handler');
 const helper = require('../helpers/helper');
 
-class Compare {
+class LikeJson {
 
-  jsonLike(actual, expected) {
-    const comparer = new LikeJson();
-    const message = comparer.compare(actual, expected);
-    const equal = message === '';
-    log.debug(`JSON Like | Equal - ${equal} | Message - ${message}`);
-    return { equal, message };
+  constructor(opts = {}) {
+    this.target = opts.target || 'Json';
   }
 
-}
-
-class LikeJson {
-
   compare(actual, expected, actualPath = '$', expectedPath = '$') {
     const valueRes = this.valueCompare(actual, expected, actualPath, expectedPath);
     if (valueRes !== null) {
@@ -43,7 +34,7 @@ class LikeJson {
         const expression = expected.replace(value, 'actual');
         const res = eval(expression);
         if (res !== true) {
-          return `Json doesn't fulfil expression '${expression.replace('actual', expectedPath).trim()}'`;
+          return `${this.target} doesn't fulfil expression '${expression.replace('actual', expectedPath).trim()}'`;
         }
         return true;
       }
@@ -59,7 +50,7 @@ class LikeJson {
         const args = _args.length > 0 ? _args[0].split(',') : _args;
         const res = handlerFun({ data: actual, args });
         if (res !== true) {
-          return `Json doesn't fulfil assertion '${expected}' at '${expectedPath}'`;
+          return `${this.target} doesn't fulfil assertion '${expected}' at '${expectedPath}'`;
         }
         return true;
       } catch (_) {
@@ -76,7 +67,7 @@ class LikeJson {
       if (expected.test(actual)) {
         return '';
       }
-      return `Json doesn't match with '${expected}' at '${expectedPath}' but found '${actual}'`;
+      return `${this.target} doesn't match with '${expected}' at '${expectedPath}' but found '${actual}'`;
     }
     const exprRes = this.expressionCompare(actual, expected, actualPath, expectedPath);
     if (exprRes) {
@@ -87,26 +78,26 @@ class LikeJson {
       return valueAssertRes === true ? '' : valueAssertRes;
     }
     if (typeof expected !== typeof actual) {
-      return `Json doesn't have type '${typeof expected}' at '${expectedPath}' but found '${typeof actual}'`;
+      return `${this.target} doesn't have type '${typeof expected}' at '${expectedPath}' but found '${typeof actual}'`;
     }
     if (typeof expected !== 'object' && typeof actual !== 'object') {
-      return `Json doesn't have value '${expected}' at '${expectedPath}' but found '${actual}'`;
+      return `${this.target} doesn't have value '${expected}' at '${expectedPath}' but found '${actual}'`;
     }
     if (expected === null || actual === null) {
-      return `Json doesn't have value '${expected}' at '${expectedPath}' but found '${actual}'`;
+      return `${this.target} doesn't have value '${expected}' at '${expectedPath}' but found '${actual}'`;
     }
     if (Array.isArray(expected) && !Array.isArray(actual)) {
-      return `Json doesn't have type 'array' at '${expectedPath}' but found 'object'`;
+      return `${this.target} doesn't have type 'array' at '${expectedPath}' but found 'object'`;
     }
     if (!Array.isArray(expected) && Array.isArray(actual)) {
-      return `Json doesn't have type 'object' at '${expectedPath}' but found 'array'`;
+      return `${this.target} doesn't have type 'object' at '${expectedPath}' but found 'array'`;
     }
     return null;
   }
 
   arrayCompare(actual, expected, actualPath, expectedPath) {
     if (expected.length > actual.length) {
-      return `Json doesn't have 'array' with length '${expected.length}' at '${expectedPath}' but found 'array' with length '${actual.length}'`;
+      return `${this.target} doesn't have 'array' with length '${expected.length}' at '${expectedPath}' but found 'array' with length '${actual.length}'`;
     }
     const seen = new Set();
     for (let i = 0; i < expected.length; i++) {
@@ -116,7 +107,7 @@ class LikeJson {
       const newExpectedPath = expectedPath + `[${i}]`;
       let actualPathResp = '';
       if (seen.has(i)) {
-        actualPathResp = `Json doesn't have expected value at '${newExpectedPath}'`;
+        actualPathResp = `${this.target} doesn't have expected value at '${newExpectedPath}'`;
       } else {
         actualPathResp = this.compare(aItem, eItem, newExpectedPath, newExpectedPath);
         if (actualPathResp === '') {
@@ -163,7 +154,7 @@ class LikeJson {
         continue;
       }
       if (!Object.prototype.hasOwnProperty.call(actual, prop)) {
-        return `Json doesn't have property '${prop}' at '${expectedPath}'`;
+        return `${this.target} doesn't have property '${prop}' at '${expectedPath}'`;
       }
       const newPath = expectedPath + '.' + prop;
       const resp = this.compare(actual[prop], expected[prop], newPath, newPath);
@@ -175,4 +166,10 @@ class LikeJson {
 
 }
 
-module.exports = Compare;
+function validate(actual, expected, opts) {
+  return new LikeJson(opts).compare(actual, expected);
+}
+
+module.exports = {
+  validate
+};
\ No newline at end of file
diff --git a/src/adapters/json.match.js b/src/adapters/json.match.js
new file mode 100644
index 0000000..df00cbc
--- /dev/null
+++ b/src/adapters/json.match.js
@@ -0,0 +1,21 @@
+const { utils } = require('pactum-matchers');
+
+function getMatchingRules(data, path, rules) {
+  const _rules = rules || {};
+  utils.setMatchingRules(_rules, data, path);
+  return _rules;
+}
+
+function getRawValue(data) {
+  return utils.getValue(data);
+}
+
+function validate(actual, expected, rules, path, strict) {
+  return utils.compare(actual, expected, rules, path, strict).message;
+}
+
+module.exports = {
+  getMatchingRules,
+  getRawValue,
+  validate
+};
\ No newline at end of file
diff --git a/src/adapters/json.schema.js b/src/adapters/json.schema.js
new file mode 100644
index 0000000..b9091e9
--- /dev/null
+++ b/src/adapters/json.schema.js
@@ -0,0 +1,13 @@
+const { validator } = require('@exodus/schemasafe');
+
+function validate(schema, target) {
+  const validate = validator(schema, { includeErrors: true });
+  validate(target);
+  if (validate.errors) {
+    return JSON.stringify(validate.errors, null, 2);
+  }
+}
+
+module.exports = {
+  validate
+};
\ No newline at end of file
diff --git a/src/adapters/logger.js b/src/adapters/logger.js
new file mode 100644
index 0000000..793b190
--- /dev/null
+++ b/src/adapters/logger.js
@@ -0,0 +1,43 @@
+const { magenta, blue, green, yellow, red } = require('../helpers/colors');
+const trm = console;
+
+function trace(msg) {
+  process.stdout.write(`[${magenta('T')}] `);
+  msg.forEach(m => trm.debug(m));
+}
+
+function debug(msg) {
+  process.stdout.write(`[${blue('D')}] `);
+  msg.forEach(m => trm.debug(m));
+}
+
+function info(msg) {
+  process.stdout.write(`[${green('I')}] `);
+  msg.forEach(m => trm.info(m));
+}
+
+function warn(msg) {
+  process.stdout.write(`[${yellow('W')}] `);
+  msg.forEach(m => trm.warn(getMessage(m)));
+}
+
+function error(msg) {
+  process.stdout.write(`[${red('E')}] `);
+  msg.forEach(m => trm.error(getMessage(m)));
+}
+
+function getMessage(msg) {
+  try {
+    return typeof msg === 'object' ? JSON.stringify(msg, null, 2) : msg;
+  } catch (_) {
+    return msg;
+  }
+}
+
+module.exports = {
+  trace,
+  debug,
+  info,
+  warn,
+  error
+};
\ No newline at end of file
diff --git a/src/config.js b/src/config.js
index 93b03aa..31d7461 100644
--- a/src/config.js
+++ b/src/config.js
@@ -7,7 +7,11 @@ const config = {
     baseUrl: process.env.PACTUM_REQUEST_BASE_URL || '',
     timeout: process.env.PACTUM_REQUEST_TIMEOUT ? parseInt(process.env.PACTUM_REQUEST_TIMEOUT) : 3000,
     headers: {},
-    followRedirects: false
+    followRedirects: false,
+    retry: {
+      count: 1,
+      delay: 1000
+    }
   },
   response: {
     time: process.env.PACTUM_RESPONSE_TIME ? parseInt(process.env.PACTUM_RESPONSE_TIME) : null,
@@ -53,10 +57,6 @@ const config = {
   },
   reporter : {
     autoRun: true
-  },
-  retry: {
-    count: 1,
-    delay: 1000
   }
 };
 
diff --git a/src/exports/expect.d.ts b/src/exports/expect.d.ts
index 78ab4a2..ba8e041 100644
--- a/src/exports/expect.d.ts
+++ b/src/exports/expect.d.ts
@@ -2,6 +2,8 @@ export interface Have {
   status(code: number): void;
   header(key: string, value: any): void;
   headerContains(key: string, value: any): void;
+  cookiesLike(key: any, value?: any): void;
+  cookies(key: any, value?: any): void;
   body(value: any): void;
   bodyContains(value: any): void;
   json(value: any): void;
diff --git a/src/exports/expect.js b/src/exports/expect.js
index 1b02e0c..ce93ae5 100644
--- a/src/exports/expect.js
+++ b/src/exports/expect.js
@@ -24,6 +24,16 @@ class Have {
     this._validate();
   }
 
+  cookiesLike(key, value) {
+    this.expect.cookies.push(utils.createCookieObject(key, value));
+    this._validate();
+  }
+
+  cookies(key, value) {
+    this.expect.cookiesLike.push(utils.createCookieObject(key, value));
+    this._validate();
+  }
+
   body(value) {
     this.expect.body = value;
     this._validate();
diff --git a/src/exports/logger.d.ts b/src/exports/logger.d.ts
deleted file mode 100644
index d448751..0000000
--- a/src/exports/logger.d.ts
+++ /dev/null
@@ -1,1 +0,0 @@
-export function get(): any;
\ No newline at end of file
diff --git a/src/exports/settings.d.ts b/src/exports/settings.d.ts
index 495f3f7..0569651 100644
--- a/src/exports/settings.d.ts
+++ b/src/exports/settings.d.ts
@@ -1,11 +1,20 @@
-export type LogLevel = 'VERBOSE'|'TRACE'|'DEBUG'|'INFO'|'WARN'|'ERROR'|'SILENT';
+export type LogLevel = 'VERBOSE' | 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'SILENT';
 
 /**
   * sets log level
   * @env PACTUM_LOG_LEVEL
 */
 export function setLogLevel(level: LogLevel): void;
-export function setLogger(logger: object): void;
+
+export type LogFunction = (messages: any[]) => void;
+export interface Logger {
+  trace: LogFunction;
+  debug: LogFunction;
+  info: LogFunction;
+  warn: LogFunction;
+  error: LogFunction;
+}
+export function setLogger(logger: Logger): void;
 
 export interface Strategy {
   starts?: string;
@@ -18,5 +27,5 @@ export function setAssertExpressionStrategy(strategy: Strategy): void;
 export function setCaptureHandlerStrategy(strategy: Strategy): void;
 export function setSnapshotDirectoryPath(path: string): void;
 export function setReporterAutoRun(auto: boolean): void;
-export function setDefaultRetryCount(count: number): void;
-export function setDefaultRetryDelay(delay: number): void;
\ No newline at end of file
+export function setRequestDefaultRetryCount(count: number): void;
+export function setRequestDefaultRetryDelay(delay: number): void;
\ No newline at end of file
diff --git a/src/exports/settings.js b/src/exports/settings.js
index be00020..afccc05 100644
--- a/src/exports/settings.js
+++ b/src/exports/settings.js
@@ -1,14 +1,14 @@
 const config = require('../config');
-const logger = require('./logger');
+const logger = require('../plugins/logger');
 
 const settings = {
 
   setLogLevel(level) {
-    logger.get().setLevel(level);
+    logger.setLevel(level);
   },
 
   setLogger(lgr) {
-    logger.set(lgr);
+    logger.setAdapter(lgr);
   },
 
   setAssertHandlerStrategy(strategy) {
@@ -31,12 +31,12 @@ const settings = {
     config.reporter.autoRun = val;
   },
 
-  setDefaultRetryCount(count) {
-    config.retry.count = count;
+  setRequestDefaultRetryCount(count) {
+    config.request.retry.count = count;
   },
 
-  setDefaultRetryDelay(delay) {
-    config.retry.delay = delay;
+  setRequestDefaultRetryDelay(delay) {
+    config.request.retry.delay = delay;
   }
 
 };
diff --git a/src/exports/stash.js b/src/exports/stash.js
index 9ac2d9d..5268e6b 100644
--- a/src/exports/stash.js
+++ b/src/exports/stash.js
@@ -1,6 +1,6 @@
 const fs = require('fs');
 const pt = require('path');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const { PactumConfigurationError } = require('../helpers/errors');
 const config = require('../config');
 
diff --git a/src/helpers/dataProcessor.js b/src/helpers/dataProcessor.js
index 03ec499..f9a3292 100644
--- a/src/helpers/dataProcessor.js
+++ b/src/helpers/dataProcessor.js
@@ -4,7 +4,7 @@ const { klona } = require("klona");
 
 const stash = require('../exports/stash');
 const handler = require('../exports/handler');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const config = require('../config');
 
 const DATA_REF_PATTERN = /(\$\w\{[^\}]+\})/g;
diff --git a/src/helpers/handler.runner.js b/src/helpers/handler.runner.js
index dbab7cf..29a7271 100644
--- a/src/helpers/handler.runner.js
+++ b/src/helpers/handler.runner.js
@@ -1,5 +1,5 @@
 const handler = require('../exports/handler');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 
 const hr = {
 
diff --git a/src/helpers/utils.js b/src/helpers/utils.js
index 46792c4..1188cf6 100644
--- a/src/helpers/utils.js
+++ b/src/helpers/utils.js
@@ -1,7 +1,9 @@
 const { compare } = require('pactum-matchers').utils;
 const graphQL = require('./graphQL');
+const lc = require('lightcookie');
+const { PactumRequestError } = require('../helpers/errors');
 
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const helper = require('./helper');
 
 const utils = {
@@ -58,6 +60,23 @@ const utils = {
     } else {
       jsonArray.push(item);
     }
+  },
+
+  createCookieObject(key, value) {
+    let cookieObject = {};
+    if (typeof key === 'string') {
+      if (value !== undefined) {
+        cookieObject[key] = value;
+      } else if (value === undefined) {
+        cookieObject = lc.parse(key);
+      }
+    } else {
+      if (!helper.isValidObject(key)) {
+        throw new PactumRequestError('`cookies` are required');
+      }
+      Object.assign(cookieObject, key);
+    }
+    return cookieObject;
   }
 
 };
diff --git a/src/index.js b/src/index.js
index 5cde337..8542d60 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,3 +1,8 @@
+require('./plugins/logger').setAdapter(require('./adapters/logger'));
+require('./plugins/json.schema').setAdapter(require('./adapters/json.schema'));
+require('./plugins/json.match').setAdapter(require('./adapters/json.match'));
+require('./plugins/json.like').setAdapter(require('./adapters/json.like'));
+
 const Spec = require('./models/Spec');
 const Fuzz = require('./models/Fuzz');
 const E2E = require('./models/E2E');
diff --git a/src/models/FuzzTosser.js b/src/models/FuzzTosser.js
index 890d24c..ee78372 100644
--- a/src/models/FuzzTosser.js
+++ b/src/models/FuzzTosser.js
@@ -1,6 +1,6 @@
 const phin = require('phin');
 const fuzzCore = require('openapi-fuzzer-core');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const rp = require('../helpers/requestProcessor');
 const helper = require('../helpers/helper');
 const mock = require('../exports/mock');
diff --git a/src/models/Spec.d.ts b/src/models/Spec.d.ts
index 71cefd6..a8c6b87 100644
--- a/src/models/Spec.d.ts
+++ b/src/models/Spec.d.ts
@@ -450,7 +450,7 @@ declare class Spec {
   expectJson(json: object): Spec;
 
   /**
-   * expects a cookie in the response
+   * expects exact match on cookie in the response
    * @example
    * await pactum.spec()
    *  .get('https://jsonplaceholder.typicode.com/posts/1')
@@ -470,24 +470,24 @@ declare class Spec {
   expectCookies(raw: string): Spec;
 
   /**
-   * expects exact match on cookie in the response
+   * expects a partial cookie in the response
    * @example
    * await pactum.spec()
    *  .get('https://jsonplaceholder.typicode.com/posts/1')
-   *  .expectCookies('name', 'snow')
-   *  .expectCookies({
+   *  .expectCookiesLike('name', 'snow')
+   *  .expectCookiesLike({
    *    name: 'snow',
    *    httpOnly: null
    *  })
-   *  .expectCookies('name=snow')
+   *  .expectCookiesLike('name=snow')
    *  .expectJson({
    *    userId: 1,
    *    user: 'frank'
    *  });
    */
-  expectStrictCookies(key: string, value: any): Spec;
-  expectStrictCookies(json: object): Spec;
-  expectStrictCookies(raw: string): Spec;
+  expectCookiesLike(key: string, value: any): Spec;
+  expectCookiesLike(json: object): Spec;
+  expectCookiesLike(raw: string): Spec;
 
   /**
    * expects a partial json object in the response
diff --git a/src/models/Spec.js b/src/models/Spec.js
index 3cba993..8fb2e40 100644
--- a/src/models/Spec.js
+++ b/src/models/Spec.js
@@ -1,13 +1,13 @@
 const FormData = require('form-data');
 const fs = require('fs');
-const lightcookie = require('lightcookie');
+const lc = require('lightcookie');
 
 const path = require('path');
 const Tosser = require('./Tosser');
 const Expect = require('./expect');
 const State = require('./State');
 const helper = require('../helpers/helper');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const th = require('../helpers/toss.helper');
 const utils = require('../helpers/utils');
 const { PactumRequestError } = require('../helpers/errors');
@@ -209,12 +209,12 @@ class Spec {
     if (!this._request.headers) {
       this._request.headers = {};
     }
-    let cookieObject = createCookieObject(key, value);
-    if (this._request.headers['cookie'] !== undefined) {
-      this._request.headers['cookie'] = this._request.headers['cookie'] +
-        ';' + lightcookie.serialize(cookieObject);
+    const cookieObject = utils.createCookieObject(key, value);
+    const headers = this._request.headers;
+    if (headers['cookie'] !== undefined) {
+      headers['cookie'] = headers['cookie'] + ';' + lc.serialize(cookieObject);
     } else {
-      this._request.headers['cookie'] = lightcookie.serialize(cookieObject);
+      headers['cookie'] = lc.serialize(cookieObject);
     }
     return this;
   }
@@ -358,14 +358,12 @@ class Spec {
   }
 
   expectCookies(key, value) {
-    let cookieObject = createCookieObject(key, value);
-    this._expect.cookies.push(lightcookie.serialize(cookieObject));
+    this._expect.cookies.push(utils.createCookieObject(key, value));
     return this;
   }
 
-  expectStrictCookies(key, value) {
-    let cookieObject = createCookieObject(key, value);
-    this._expect.strictCookies.push(lightcookie.serialize(cookieObject));
+  expectCookiesLike(key, value) {
+    this._expect.cookiesLike.push(utils.createCookieObject(key, value));
     return this;
   }
 
@@ -503,21 +501,4 @@ function validateRequestUrl(request, url) {
   }
 }
 
-function createCookieObject(key, value) {
-  let cookieObject = {};
-  if (typeof key === 'string') {
-    if (value !== undefined) {
-      cookieObject[key] = value;
-    } else if (value === undefined) {
-      cookieObject = lightcookie.parse(key);
-    }
-  } else {
-    if (!helper.isValidObject(key)) {
-      throw new PactumRequestError('`cookies` are required');
-    }
-    Object.assign(cookieObject, key);
-  }
-  return cookieObject;
-}
-
 module.exports = Spec;
diff --git a/src/models/Step.js b/src/models/Step.js
index 1a7b454..c11f131 100644
--- a/src/models/Step.js
+++ b/src/models/Step.js
@@ -1,5 +1,5 @@
 const Spec = require('./Spec');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const helper = require('../helpers/helper');
 const rlc = require('../helpers/reporter.lifeCycle');
 
diff --git a/src/models/Tosser.js b/src/models/Tosser.js
index 81368e1..0c43f86 100644
--- a/src/models/Tosser.js
+++ b/src/models/Tosser.js
@@ -1,6 +1,6 @@
 const phin = require('phin');
 const helper = require('../helpers/helper');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const rlc = require('../helpers/reporter.lifeCycle');
 const requestProcessor = require('../helpers/requestProcessor');
 const th = require('../helpers/toss.helper');
@@ -62,8 +62,8 @@ class Tosser {
     this.response = await getResponse(this);
     const options = this.request.retryOptions;
     if (options) {
-      const count = typeof options.count === 'number' ? options.count : config.retry.count;
-      const delay = typeof options.delay === 'number' ? options.delay : config.retry.delay;
+      const count = typeof options.count === 'number' ? options.count : config.request.retry.count;
+      const delay = typeof options.delay === 'number' ? options.delay : config.request.retry.delay;
       const strategy = options.strategy;
       for (let i = 0; i < count; i++) {
         let noRetry = true;
diff --git a/src/models/expect.js b/src/models/expect.js
index 4fc1529..f31dcd2 100644
--- a/src/models/expect.js
+++ b/src/models/expect.js
@@ -1,15 +1,16 @@
 const assert = require('assert');
 const jqy = require('json-query');
+const lc = require('lightcookie');
 
 const config = require('../config');
 const utils = require('../helpers/utils');
 const file = require('../helpers/file.utils');
-const log = require('../exports/logger').get();
-const Compare = require('../helpers/compare');
+const log = require('../plugins/logger');
 const processor = require('../helpers/dataProcessor');
 const handler = require('../exports/handler');
 const jsv = require('../plugins/json.schema');
 const jmv = require('../plugins/json.match');
+const jlv = require('../plugins/json.like');
 
 class Expect {
   constructor() {
@@ -19,7 +20,7 @@ class Expect {
     this.body = null;
     this.bodyContains = [];
     this.cookies = [];
-    this.strictCookies = [];
+    this.cookiesLike = [];
     this.json = [];
     this.jsonQuery = [];
     this.jsonLike = [];
@@ -44,7 +45,7 @@ class Expect {
     this._validateHeaderContains(response);
     this._validateBody(response);
     this._validateCookies(response);
-    this._validateStrictCookies(response);
+    this._validateCookiesLike(response);
     this._validateBodyContains(response);
     this._validateJson(response);
     this._validateJsonLike(response);
@@ -98,48 +99,28 @@ class Expect {
 
   _validateCookies(response) {
     this.cookies = processor.processData(this.cookies);
-    const expectedCookie = this.cookies[0];
-    if (expectedCookie !== undefined) {
-        if (response.headers['set-cookie'] !== undefined) {
-          // fetched cookie from actual response
-          const actualCookie = response.headers['set-cookie'][0];
-          if (expectedCookie instanceof RegExp) {
-            if (!expectedCookie.test(actualCookie) && !actualCookie.test(expectedCookie)) {
-              this.fail(`Cookie regex (${expectedCookie}) did not match for cookie '${actualCookie}'`);
-            }
-          } else {
-            if (
-              !actualCookie.toLowerCase().includes(expectedCookie.toLowerCase()) &&
-              !expectedCookie.toLowerCase().includes(actualCookie.toLowerCase())
-            ) {
-              this.fail(`Cookie value '${expectedCookie}' did not match for response cookie '${actualCookie}'`);
-            }
-          }
-        } else {
-          this.fail(`set-cookie key not found in response header'`);
-       }
+    for (let i = 0; i < this.cookies.length; i++) {
+      const expectedCookie = this.cookies[i];
+      let actualCookie = response.headers['set-cookie'];
+      if (!actualCookie) {
+        this.fail(`'set-cookie' key not found in response headers`);
+      }
+      actualCookie = lc.parse(actualCookie);
+      assert.deepStrictEqual(actualCookie, expectedCookie);
     }
   }
 
-  _validateStrictCookies(response) {
-    this.strictCookies = processor.processData(this.strictCookies);
-    const expectedCookie = this.strictCookies[0];
-    if (expectedCookie !== undefined) {
-        if (response.headers['set-cookie'] !== undefined) {
-          // fetched cookie from actual response
-          const actualCookie = response.headers['set-cookie'][0];
-          if (expectedCookie instanceof RegExp) {
-            if (!expectedCookie.test(actualCookie)) {
-              this.fail(`Cookie regex (${expectedCookie}) did not match for cookie '${actualCookie}'`);
-            }
-          } else {
-            if (expectedCookie.toLowerCase() !== actualCookie.toLowerCase()) {
-              this.fail(`Cookie value '${expectedCookie}' did not match for cookie '${actualCookie}'`);
-            }
-          }
-        } else {
-          this.fail(`set-cookie key not found in response header'`);
-        }
+  _validateCookiesLike(response) {
+    this.cookiesLike = processor.processData(this.cookiesLike);
+    for (let i = 0; i < this.cookiesLike.length; i++) {
+      const expectedCookie = this.cookiesLike[i];
+      let actualCookie = response.headers['set-cookie'];
+      if (!actualCookie) {
+        this.fail(`'set-cookie' key not found in response headers`);
+      }
+      actualCookie = lc.parse(actualCookie);
+      const msg = jlv.validate(actualCookie, expectedCookie, { target: 'Cookie' });
+      if (msg) this.fail(msg);
     }
   }
 
@@ -234,11 +215,8 @@ class Expect {
     this.jsonLike = processor.processData(this.jsonLike);
     for (let i = 0; i < this.jsonLike.length; i++) {
       const expectedJSON = this.jsonLike[i];
-      const compare = new Compare();
-      const res = compare.jsonLike(response.json, expectedJSON);
-      if (!res.equal) {
-        this.fail(res.message);
-      }
+      const msg = jlv.validate(response.json, expectedJSON);
+      if (msg) this.fail(msg);
     }
   }
 
@@ -260,11 +238,8 @@ class Expect {
     for (let i = 0; i < this.jsonQueryLike.length; i++) {
       const jQ = this.jsonQueryLike[i];
       const value = jqy(jQ.path, { data: response.json }).value;
-      const compare = new Compare();
-      const res = compare.jsonLike(value, jQ.value);
-      if (!res.equal) {
-        this.fail(res.message);
-      }
+      const msg = jlv.validate(value, jQ.value);
+      if (msg) this.fail(msg);
     }
   }
 
@@ -273,7 +248,7 @@ class Expect {
     for (let i = 0; i < this.jsonSchema.length; i++) {
       const errors = jsv.validate(this.jsonSchema[i], response.json);
       if (errors) {
-        this.fail(`Response doesn't match with JSON schema: \n ${JSON.stringify(errors, null, 2)}`);
+        this.fail(`Response doesn't match with JSON schema - ${errors}`);
       }
     }
   }
diff --git a/src/models/server.js b/src/models/server.js
index 05f67da..b31dc9c 100644
--- a/src/models/server.js
+++ b/src/models/server.js
@@ -3,7 +3,7 @@ const polka = require('polka');
 const Interaction = require('./Interaction.model');
 const helper = require('../helpers/helper');
 const utils = require('../helpers/utils');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const hr = require('../helpers/handler.runner');
 const rlc = require('../helpers/reporter.lifeCycle');
 const th = require('../helpers/toss.helper');
diff --git a/src/plugins/json.like.js b/src/plugins/json.like.js
new file mode 100644
index 0000000..08513b5
--- /dev/null
+++ b/src/plugins/json.like.js
@@ -0,0 +1,9 @@
+const BasePlugin = require('./plugin.base');
+
+class JsonLikeValidator extends BasePlugin {
+  validate(actual, expected, opts) {
+    return this.adapter.validate(actual, expected, opts);
+  }
+}
+
+module.exports = new JsonLikeValidator();
\ No newline at end of file
diff --git a/src/plugins/json.match.js b/src/plugins/json.match.js
index 4b52531..775aa85 100644
--- a/src/plugins/json.match.js
+++ b/src/plugins/json.match.js
@@ -1,21 +1,15 @@
-const { utils } = require('pactum-matchers');
-
-const jmv = {
+const BasePlugin = require('./plugin.base');
 
+class JsonMatchValidator extends BasePlugin {
   getMatchingRules(data, path, rules) {
-    const _rules = rules || {};
-    utils.setMatchingRules(_rules, data, path);
-    return _rules;
-  },
-
+    return this.adapter.getMatchingRules(data, path, rules);
+  }
   getRawValue(data) {
-    return utils.getValue(data);
-  },
-
+    return this.adapter.getRawValue(data);
+  }
   validate(actual, expected, rules, path, strict) {
-    return utils.compare(actual, expected, rules, path, strict).message;
+    return this.adapter.validate(actual, expected, rules, path, strict);
   }
+}
 
-};
-
-module.exports = jmv;
\ No newline at end of file
+module.exports = new JsonMatchValidator();
\ No newline at end of file
diff --git a/src/plugins/json.schema.js b/src/plugins/json.schema.js
index 655f4fe..8a19a94 100644
--- a/src/plugins/json.schema.js
+++ b/src/plugins/json.schema.js
@@ -1,13 +1,9 @@
-const { validator } = require('@exodus/schemasafe');
-
-const jsv = {
+const BasePlugin = require('./plugin.base');
 
+class JsonSchemaValidator extends BasePlugin {
   validate(schema, target) {
-    const validate = validator(schema, { includeErrors: true });
-    validate(target);
-    return validate.errors;
+    return this.adapter.validate(schema, target);
   }
+}
 
-};
-
-module.exports = jsv;
\ No newline at end of file
+module.exports = new JsonSchemaValidator();
\ No newline at end of file
diff --git a/src/exports/logger.js b/src/plugins/logger.js
similarity index 61%
rename from src/exports/logger.js
rename to src/plugins/logger.js
index 53f4e52..91f6001 100644
--- a/src/exports/logger.js
+++ b/src/plugins/logger.js
@@ -1,4 +1,5 @@
-const { options, magenta, blue, green, yellow, red } = require('../helpers/colors');
+const BasePlugin = require('./plugin.base');
+const { options } = require('../helpers/colors');
 
 const LEVEL_VERBOSE = 2;
 const LEVEL_TRACE = 3;
@@ -34,11 +35,10 @@ function getLevelValue(level) {
   }
 }
 
-class Logger {
+class Logger extends BasePlugin {
 
   constructor() {
-    this.console = console;
-    // validate log level
+    super();
     this.level = process.env.PACTUM_LOG_LEVEL || 'INFO';
     this.levelValue = getLevelValue(this.level);
     if (process.env.PACTUM_DISABLE_LOG_COLORS === 'true') {
@@ -57,57 +57,34 @@ class Logger {
 
   trace(...msg) {
     if (this.levelValue <= LEVEL_TRACE) {
-      process.stdout.write(`[${magenta('T')}] `);
-      msg.forEach(m => this.console.debug(m));
+      this.adapter.trace(msg);
     }
   }
 
   debug(...msg) {
     if (this.levelValue <= LEVEL_DEBUG) {
-      process.stdout.write(`[${blue('D')}] `);
-      msg.forEach(m => this.console.debug(m));
+      this.adapter.debug(msg);
     }
   }
 
   info(...msg) {
     if (this.levelValue <= LEVEL_INFO) {
-      process.stdout.write(`[${green('I')}] `);
-      msg.forEach(m => this.console.info(m));
+      this.adapter.info(msg);
     }
   }
 
   warn(...msg) {
     if (this.levelValue <= LEVEL_WARN) {
-      process.stdout.write(`[${yellow('W')}] `);
-      msg.forEach(m => this.console.warn(getMessage(m)));
+      this.adapter.warn(msg);
     }
   }
 
   error(...msg) {
     if (this.levelValue <= LEVEL_ERROR) {
-      process.stdout.write(`[${red('E')}] `);
-      msg.forEach(m => this.console.error(getMessage(m)));
+      this.adapter.error(msg);
     }
   }
 
 }
 
-function getMessage(msg) {
-  try {
-    return typeof msg === 'object' ? JSON.stringify(msg, null, 2) : msg;
-  } catch (_) {
-    return msg;
-  }
-}
-
-module.exports = {
-  logger: new Logger(),
-
-  get() {
-    return this.logger;
-  },
-
-  set(lgr) {
-    this.logger = lgr;
-  }
-};
+module.exports = new Logger();
diff --git a/src/plugins/plugin.base.js b/src/plugins/plugin.base.js
new file mode 100644
index 0000000..7ba6bcd
--- /dev/null
+++ b/src/plugins/plugin.base.js
@@ -0,0 +1,10 @@
+class BasePlugin {
+  constructor() {
+    this.adapter = null;
+  }
+  setAdapter(adapter) {
+    this.adapter = adapter;
+  }
+}
+
+module.exports = BasePlugin;
\ No newline at end of file


Test patch:
diff --git a/src/models/E2E.js b/src/models/E2E.js
index 6d52f88..6670b38 100644
--- a/src/models/E2E.js
+++ b/src/models/E2E.js
@@ -1,5 +1,5 @@
 const Step = require('./Step');
-const log = require('../exports/logger').get();
+const log = require('../plugins/logger');
 const helper = require('../helpers/helper');
 const rlc = require('../helpers/reporter.lifeCycle');
 const hr = require('../helpers/handler.runner');
diff --git a/test/component/bdd.spec.js b/test/component/bdd.spec.js
index 152f853..2905983 100644
--- a/test/component/bdd.spec.js
+++ b/test/component/bdd.spec.js
@@ -31,6 +31,9 @@ describe('BDD', () => {
       },
       response: {
         status: 200,
+        headers: {
+          'set-cookie': 'name=snow'
+        },
         body: {
           name: 'snow'
         }
@@ -55,6 +58,11 @@ describe('BDD', () => {
     expect(response).to.have.headerContains('connection', 'cl');
   });
 
+  it('should return cookies', () => {
+    expect(response).to.have.cookiesLike('name', 'snow');
+    expect(response).to.have.cookies('name', 'snow');
+  });
+
   it('should return a valid user', async () => {
     expect(response).to.have.json({ name: 'snow' });
     expect(response).should.have.jsonLike({ name: 'snow' });
diff --git a/test/component/cookies.spec.js b/test/component/cookies.spec.js
index b52ae5f..1ee6543 100644
--- a/test/component/cookies.spec.js
+++ b/test/component/cookies.spec.js
@@ -1,14 +1,18 @@
 const pactum = require('../../src/index');
+const expect = require('chai').expect;
 
 describe('Cookies', () => {
-  //
-  it('sending cookies as key,value pair', async () => {
+
+  it('sending cookies as key-value pair', async () => {
     await pactum
       .spec()
       .useInteraction({
         request: {
           method: 'GET',
           path: '/api/army',
+          headers: {
+            cookie: 'name=snow'
+          }
         },
         response: {
           status: 200,
@@ -25,7 +29,7 @@ describe('Cookies', () => {
       .get('http://localhost:9393/api/army')
       .withCookies('name', 'snow')
       .expectStatus(200)
-      .expectCookies('name', 'snow');
+      .expectCookiesLike('name', 'snow');
   });
 
   it('sending cookies as string', async () => {
@@ -35,6 +39,9 @@ describe('Cookies', () => {
         request: {
           method: 'GET',
           path: '/api/army',
+          headers: {
+            cookie: 'name=snow'
+          }
         },
         response: {
           status: 200,
@@ -51,7 +58,7 @@ describe('Cookies', () => {
       .get('http://localhost:9393/api/army')
       .withCookies('name=snow')
       .expectStatus(200)
-      .expectStrictCookies('name=snow');
+      .expectCookies('name=snow');
   });
 
   it('sending cookies as object', async () => {
@@ -61,6 +68,9 @@ describe('Cookies', () => {
         request: {
           method: 'GET',
           path: '/api/army',
+          headers: {
+            cookie: 'name=snow'
+          }
         },
         response: {
           status: 200,
@@ -77,42 +87,19 @@ describe('Cookies', () => {
       .get('http://localhost:9393/api/army')
       .withCookies({ name: 'snow' })
       .expectStatus(200)
-      .expectStrictCookies({ name: 'snow' });
+      .expectCookies({ name: 'snow' });
   });
 
-  it('expecting strict cookie', async () => {
+  it('sending multiple cookies & assert multiple cookies', async () => {
     await pactum
       .spec()
       .useInteraction({
         request: {
           method: 'GET',
           path: '/api/army',
-        },
-        response: {
-          status: 200,
           headers: {
-            'set-cookie': 'name=snow',
-          },
-          body: {
-            Name: 'Golden Army',
-            Count: 10000,
-            Alliance: 'Stark',
-          },
-        },
-      })
-      .get('http://localhost:9393/api/army')
-      .withCookies('name=snow')
-      .expectStatus(200)
-      .expectStrictCookies('name', 'snow');
-  });
-
-  it('sending muliple cookies', async () => {
-    await pactum
-      .spec()
-      .useInteraction({
-        request: {
-          method: 'GET',
-          path: '/api/army',
+            cookie: 'name=snow;httpOnly;foo=bar;bro'
+          }
         },
         response: {
           status: 200,
@@ -129,7 +116,110 @@ describe('Cookies', () => {
       .get('http://localhost:9393/api/army')
       .withCookies({ name: 'snow', httpOnly: null })
       .withCookies('foo', 'bar')
+      .withCookies('bro')
       .expectStatus(200)
-      .expectCookies('name', 'snow');
+      .expectCookiesLike('name', 'snow')
+      .expectCookiesLike('httpOnly')
+      .expectCookiesLike('foo', 'bar')
+      .expectCookies('foo=bar;name=snow;httpOnly');
+  });
+
+  it('set-cookie key not found in response - expectCookie', async () => {
+    let err;
+    try {
+      await pactum
+        .spec()
+        .useInteraction({
+          request: {
+            method: 'GET',
+            path: '/api/army'
+          },
+          response: {
+            status: 200
+          },
+        })
+        .get('http://localhost:9393/api/army')
+        .expectStatus(200)
+        .expectCookiesLike('name', 'snow');
+    } catch (error) {
+      err = error;
+    }
+    expect(err.message).equals(`'set-cookie' key not found in response headers`);
+  });
+
+  it('set-cookie key not found in response - expectCookies', async () => {
+    let err;
+    try {
+      await pactum
+        .spec()
+        .useInteraction({
+          request: {
+            method: 'GET',
+            path: '/api/army'
+          },
+          response: {
+            status: 200
+          },
+        })
+        .get('http://localhost:9393/api/army')
+        .expectStatus(200)
+        .expectCookies('name', 'snow');
+    } catch (error) {
+      err = error;
+    }
+    expect(err.message).equals(`'set-cookie' key not found in response headers`);
+  });
+
+  it('expected cookie not found in response - expectCookie', async () => {
+    let err;
+    try {
+      await pactum
+        .spec()
+        .useInteraction({
+          request: {
+            method: 'GET',
+            path: '/api/army'
+          },
+          response: {
+            status: 200,
+            headers: {
+              'set-cookie': 'httpOnly'
+            }
+          },
+        })
+        .get('http://localhost:9393/api/army')
+        .expectStatus(200)
+        .expectCookiesLike('name', 'snow');
+    } catch (error) {
+      err = error;
+    }
+    expect(err.message).equals(`Cookie doesn't have property 'name' at '$'`);
   });
+
+  it('expected cookie not found in response - expectCookies', async () => {
+    let err;
+    try {
+      await pactum
+        .spec()
+        .useInteraction({
+          request: {
+            method: 'GET',
+            path: '/api/army'
+          },
+          response: {
+            status: 200,
+            headers: {
+              'set-cookie': 'httpOnly;name=snow'
+            }
+          },
+        })
+        .get('http://localhost:9393/api/army')
+        .expectStatus(200)
+        .expectCookies('name', 'snow');
+    } catch (error) {
+      err = error;
+    }
+    expect(err.message).not.undefined;
+  });
+
 });
diff --git a/test/component/retries.spec.js b/test/component/retries.spec.js
index 03aee72..a0354f6 100644
--- a/test/component/retries.spec.js
+++ b/test/component/retries.spec.js
@@ -5,8 +5,8 @@ const { settings } = pactum;
 describe('Retries', () => {
 
   before(() => {
-    settings.setDefaultRetryCount(1);
-    settings.setDefaultRetryDelay(1);
+    settings.setRequestDefaultRetryCount(1);
+    settings.setRequestDefaultRetryDelay(1);
   });
 
   it('default retry', async () => {
@@ -214,8 +214,8 @@ describe('Retries', () => {
   });
 
   after(() => {
-    settings.setDefaultRetryCount(1);
-    settings.setDefaultRetryDelay(1000);
+    settings.setRequestDefaultRetryCount(1);
+    settings.setRequestDefaultRetryDelay(1000);
   });
 
 });
diff --git a/test/unit/compare.spec.js b/test/unit/json.like.spec.js
similarity index 63%
rename from test/unit/compare.spec.js
rename to test/unit/json.like.spec.js
index fe8661a..3b80b95 100644
--- a/test/unit/compare.spec.js
+++ b/test/unit/json.like.spec.js
@@ -1,16 +1,14 @@
 const expect = require('chai').expect;
-const Compare = require('../../src/helpers/compare');
 const handler = require('../../src/exports/handler');
 const settings = require('../../src/exports/settings');
+const jsl = require('../../src/adapters/json.like');
 
 describe('JSON Like - Object - Equal Properties', () => {
 
   it('object equals - empty', () => {
     const actual = {};
     const expected = {};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('object equals - different types of properties', () => {
@@ -28,9 +26,7 @@ describe('JSON Like - Object - Equal Properties', () => {
       any: null,
       age: /\d+/
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('object not equals - one property - number', () => {
@@ -40,10 +36,7 @@ describe('JSON Like - Object - Equal Properties', () => {
     const expected = {
       id: 2
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '2' at '$.id' but found '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '2' at '$.id' but found '1'`);
   });
 
   it('object not equals - one property - different types', () => {
@@ -53,10 +46,7 @@ describe('JSON Like - Object - Equal Properties', () => {
     const expected = {
       id: '1'
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have type 'string' at '$.id' but found 'number'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have type 'string' at '$.id' but found 'number'`);
   });
 
   it('object not equals - different types - actual array', () => {
@@ -64,10 +54,7 @@ describe('JSON Like - Object - Equal Properties', () => {
     const expected = {
       id: '1'
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have type 'object' at '$' but found 'array'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have type 'object' at '$' but found 'array'`);
   });
 
   it('object not equals - different types - expected array', () => {
@@ -75,10 +62,7 @@ describe('JSON Like - Object - Equal Properties', () => {
     const actual = {
       id: '1'
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have type 'array' at '$' but found 'object'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have type 'array' at '$' but found 'object'`);
   });
 
   it('object not equals - one property - string', () => {
@@ -88,10 +72,7 @@ describe('JSON Like - Object - Equal Properties', () => {
     const expected = {
       id: "2"
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '2' at '$.id' but found '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '2' at '$.id' but found '1'`);
   });
 
   it('object not equals - one property - boolean', () => {
@@ -101,10 +82,7 @@ describe('JSON Like - Object - Equal Properties', () => {
     const expected = {
       id: true
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value 'true' at '$.id' but found 'false'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value 'true' at '$.id' but found 'false'`);
   });
 
   it('object not equals - one property - null', () => {
@@ -114,10 +92,7 @@ describe('JSON Like - Object - Equal Properties', () => {
     const expected = {
       id: null
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).contains(`Json doesn't have value 'null' at '$.id' but found`);
+    expect(jsl.validate(actual, expected)).contains(`Json doesn't have value 'null' at '$.id' but found`);
   });
 
   it('object not equals - one property - RegEx', () => {
@@ -127,10 +102,7 @@ describe('JSON Like - Object - Equal Properties', () => {
     const expected = {
       id: /\W+/
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't match with '/\\W+/' at '$.id' but found '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't match with '/\\W+/' at '$.id' but found '1'`);
   });
 
   it('object not equals - multiple properties', () => {
@@ -142,10 +114,7 @@ describe('JSON Like - Object - Equal Properties', () => {
       id: 1,
       name: 'bent'
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value 'bent' at '$.name' but found 'hunt'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value 'bent' at '$.name' but found 'hunt'`);
   });
 
   it('nested objects equals - multiple properties', () => {
@@ -173,9 +142,7 @@ describe('JSON Like - Object - Equal Properties', () => {
         }
       }
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('nested objects not equals - multiple properties', () => {
@@ -203,10 +170,7 @@ describe('JSON Like - Object - Equal Properties', () => {
         }
       }
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '50' at '$.scores.sciences.physics' but found '40'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '50' at '$.scores.sciences.physics' but found '40'`);
   });
 
 });
@@ -220,10 +184,7 @@ describe('JSON Like - Object - Extra Properties', () => {
     const expected = {
       name: "2"
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have property 'name' at '$'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have property 'name' at '$'`);
   });
 
   it('object equals - multiple properties', () => {
@@ -234,9 +195,7 @@ describe('JSON Like - Object - Extra Properties', () => {
     const expected = {
       id: 1
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('object not equals - multiple properties', () => {
@@ -248,10 +207,7 @@ describe('JSON Like - Object - Extra Properties', () => {
       id: 1,
       age: 26
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have property 'age' at '$'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have property 'age' at '$'`);
   });
 
   it('nested object equals - multiple properties', () => {
@@ -269,9 +225,7 @@ describe('JSON Like - Object - Extra Properties', () => {
         social: 80,
       }
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('nested object not equals - multiple properties', () => {
@@ -292,10 +246,7 @@ describe('JSON Like - Object - Extra Properties', () => {
         art: 12
       }
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have property 'art' at '$.scores'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have property 'art' at '$.scores'`);
   });
 
   it('nested objects equals - multiple properties', () => {
@@ -320,9 +271,7 @@ describe('JSON Like - Object - Extra Properties', () => {
         }
       }
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('nested objects not equals - multiple properties', () => {
@@ -351,10 +300,7 @@ describe('JSON Like - Object - Extra Properties', () => {
         }
       }
     };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have property 'biology' at '$.scores.sciences'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have property 'biology' at '$.scores.sciences'`);
   });
 
 });
@@ -364,120 +310,85 @@ describe('JSON Like - Array', () => {
   it('array equals - empty', () => {
     const actual = [];
     const expected = [];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('array equals - one item - number', () => {
     const actual = [1];
     const expected = [1];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('array not equals - one item - number', () => {
     const actual = [1];
     const expected = [2];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '2' at '$[0]' but found '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '2' at '$[0]' but found '1'`);
   });
 
   it('array equals - multiple items - number', () => {
     const actual = [1, 2, 3];
     const expected = [1, 2, 3];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('array equals - multiple items (reverse order) - number', () => {
     const actual = [1, 2, 3];
     const expected = [3, 2, 1];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('array not equals - multiple expected items', () => {
     const actual = [1];
     const expected = [2, 3];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have 'array' with length '2' at '$' but found 'array' with length '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have 'array' with length '2' at '$' but found 'array' with length '1'`);
   });
 
   it('array not equals - multiple actual items', () => {
     const actual = [1, 4];
     const expected = [2, 3];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '2' at '$[0]' but found '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '2' at '$[0]' but found '1'`);
   });
 
   it('array not equals - multiple actual items - last item doesn\'t match', () => {
     const actual = [1, 4];
     const expected = [1, 3];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '3' at '$[1]' but found '4'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '3' at '$[1]' but found '4'`);
   });
 
   it('nested array equals - multiple items - number', () => {
     const actual = [[1, 2], [2, 4]];
     const expected = [[1, 2], [2, 4]];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('nested array equals - multiple items (reverse) - number', () => {
     const actual = [[1, 2], [2, 4]];
     const expected = [[2, 4], [1, 2]];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('nested array not equals - multiple items - number', () => {
     const actual = [[1, 2], [2, 4]];
     const expected = [[1, 2], [3, 5]];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '3' at '$[1][0]' but found '2'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '3' at '$[1][0]' but found '2'`);
   });
 
   it('nested array not equals - multiple actual items - number', () => {
     const actual = [[1, 2], [2, 4], [3, 4]];
     const expected = [[1, 2], [3, 5]];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '3' at '$[1][0]' but found '2'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '3' at '$[1][0]' but found '2'`);
   });
 
   it('array equals - multiple expected items - number', () => {
     const actual = [1, 2, 3, 2];
     const expected = [2, 2];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('array not equals - multiple expected items - number', () => {
     const actual = [1, 2, 3];
     const expected = [2, 2];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have expected value at '$[1]'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have expected value at '$[1]'`);
   });
 
 });
@@ -487,9 +398,7 @@ describe('JSON Like Array of Objects', () => {
   it('equals - empty arrays', () => {
     const actual = [{}];
     const expected = [{}];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('equals - empty expected array', () => {
@@ -497,9 +406,7 @@ describe('JSON Like Array of Objects', () => {
       id: 1
     }];
     const expected = [{}];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('equals - array of one object with one property', () => {
@@ -509,9 +416,7 @@ describe('JSON Like Array of Objects', () => {
     const expected = [{
       id: 1
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('not equals - array of one object with one property', () => {
@@ -521,10 +426,7 @@ describe('JSON Like Array of Objects', () => {
     const expected = [{
       id: 2
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '2' at '$[0].id' but found '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '2' at '$[0].id' but found '1'`);
   });
 
   it('equals - array of one object with multiple properties', () => {
@@ -536,9 +438,7 @@ describe('JSON Like Array of Objects', () => {
       id: 1,
       name: 'hunt'
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('not equals - array of one object with multiple properties', () => {
@@ -550,10 +450,7 @@ describe('JSON Like Array of Objects', () => {
       id: 1,
       name: 'bent'
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value 'bent' at '$[0].name' but found 'hunt'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value 'bent' at '$[0].name' but found 'hunt'`);
   });
 
   it('equals - array of one nested object', () => {
@@ -573,9 +470,7 @@ describe('JSON Like Array of Objects', () => {
         social: 80
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('not equals - array of one nested object', () => {
@@ -595,10 +490,7 @@ describe('JSON Like Array of Objects', () => {
         social: 70
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '70' at '$[0].scores.social' but found '80'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '70' at '$[0].scores.social' but found '80'`);
   });
 
   it('equals - array of one with nested objects', () => {
@@ -626,9 +518,7 @@ describe('JSON Like Array of Objects', () => {
         }
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('not equals - array of one with nested objects', () => {
@@ -656,10 +546,7 @@ describe('JSON Like Array of Objects', () => {
         }
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '30' at '$[0].scores.sciences.physics' but found '40'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '30' at '$[0].scores.sciences.physics' but found '40'`);
   });
 
   it('equals - array of one with nested objects & array of numbers', () => {
@@ -689,9 +576,7 @@ describe('JSON Like Array of Objects', () => {
         languages: [21, 22]
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('not equals - array of one with nested objects & array of numbers', () => {
@@ -721,10 +606,7 @@ describe('JSON Like Array of Objects', () => {
         languages: [20, 22]
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '20' at '$[0].scores.languages[0]' but found '21'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '20' at '$[0].scores.languages[0]' but found '21'`);
   });
 
   it('equals - array of one with nested objects & array of objects', () => {
@@ -772,9 +654,7 @@ describe('JSON Like Array of Objects', () => {
         ]
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('not equals - array of one with nested objects & array of objects', () => {
@@ -822,10 +702,7 @@ describe('JSON Like Array of Objects', () => {
         ]
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '41' at '$[0].scores.languages[1].english' but found '42'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '41' at '$[0].scores.languages[1].english' but found '42'`);
   });
 
   it('equals - array of multiple with nested objects & array of objects', () => {
@@ -897,9 +774,7 @@ describe('JSON Like Array of Objects', () => {
         ]
       }
     }];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('equals - array of multiple with nested objects & array of objects - trimmed expected', () => {
@@ -991,9 +866,7 @@ describe('JSON Like Array of Objects', () => {
         }
       }
     ];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('not equals - array of multiple with nested objects & array of objects - trimmed expected', () => {
@@ -1085,10 +958,7 @@ describe('JSON Like Array of Objects', () => {
         }
       }
     ];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '42' at '$[1].scores.languages[0].english' but found '43'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '42' at '$[1].scores.languages[0].english' but found '43'`);
   });
 
   it('equals - different order', () => {
@@ -1132,9 +1002,7 @@ describe('JSON Like Array of Objects', () => {
         id: 1
       }
     ];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('not equals - different order', () => {
@@ -1166,10 +1034,7 @@ describe('JSON Like Array of Objects', () => {
         id: 1
       }
     ];
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have expected value at '$[3]'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have expected value at '$[3]'`);
   });
 
 });
@@ -1179,61 +1044,44 @@ describe('JSON Like - Assert Expressions', () => {
   it('object fulfil simple expression', () => {
     const actual = { id: 1 };
     const expected = { id: '$V === 1'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('object does not fulfil simple expression', () => {
     const actual = { id: 1 };
     const expected = { id: '$V > 1'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't fulfil expression '$.id > 1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't fulfil expression '$.id > 1'`);
   });
 
   it('array fulfil simple expression', () => {
     const actual = [{ id: 1 }];
     const expected = '$V.length === 1';
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('array does not fulfil simple expression', () => {
     const actual = [{ id: 1 }];
     const expected = '$V.length > 1';
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't fulfil expression '$.length > 1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't fulfil expression '$.length > 1'`);
   });
 
   it('object fulfil complex expression', () => {
     const actual = { id: 1, marks: { maths: 70 } };
     const expected = { id: 1, marks: { maths: '$V > 50' } };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('object does not fulfil complex expression', () => {
     const actual = { id: 1, marks: { maths: 70 } };
     const expected = { id: 1, marks: { maths: '$V > 80' } };
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't fulfil expression '$.marks.maths > 80'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't fulfil expression '$.marks.maths > 80'`);
   });
 
   it('object fulfil simple custom includes expression', () => {
     settings.setAssertExpressionStrategy({ includes: '$' });
     const actual = { id: 1 };
     const expected = { id: '$ === 1'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   afterEach(() => {
@@ -1256,72 +1104,53 @@ describe('JSON Like - Assert Handlers', () => {
   it('object fulfil simple assert', () => {
     const actual = { id: 1 };
     const expected = { id: '#number'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('object does not fulfil simple assert', () => {
     const actual = { id: '1' };
     const expected = { id: '#number'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't fulfil assertion '#number' at '$.id'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't fulfil assertion '#number' at '$.id'`);
   });
 
   it('object fulfil simple assert with args', () => {
     const actual = { id: 1 };
     const expected = { id: '#type:number'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('simple assert does not exist', () => {
     const actual = { id: '1' };
     const expected = { id: '#number py'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '#number py' at '$.id' but found '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '#number py' at '$.id' but found '1'`);
   });
 
   it('object fulfil simple custom starts with assert', () => {
     settings.setAssertHandlerStrategy({ starts: '#$' });
     const actual = { id: 1 };
     const expected = { id: '#$number'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('object fulfil simple custom ends with assert', () => {
     settings.setAssertHandlerStrategy({ ends: '#$' });
     const actual = { id: 1 };
     const expected = { id: 'number#$'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('object fulfil simple custom starts & ends with assert', () => {
     settings.setAssertHandlerStrategy({ starts: '#$', ends: '$#' });
     const actual = { id: 1 };
     const expected = { id: '#$number$#'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(true);
+    expect(jsl.validate(actual, expected)).equals('');
   });
 
   it('simple assert satisfies only one strategy', () => {
     settings.setAssertHandlerStrategy({ starts: '#', ends: '$#' });
     const actual = { id: '1' };
     const expected = { id: '#number'};
-    const compare = new Compare();
-    const res = compare.jsonLike(actual, expected);
-    expect(res.equal).equals(false);
-    expect(res.message).equals(`Json doesn't have value '#number' at '$.id' but found '1'`);
+    expect(jsl.validate(actual, expected)).equals(`Json doesn't have value '#number' at '$.id' but found '1'`);
   });
 
   afterEach(() => {
diff --git a/test/unit/logger.spec.js b/test/unit/logger.spec.js
index fa6aee3..3284b74 100644
--- a/test/unit/logger.spec.js
+++ b/test/unit/logger.spec.js
@@ -1,6 +1,7 @@
 const expect = require('chai').expect;
 const sandbox = require('sinon').createSandbox();
-const logger = require('../../src/exports/logger').get();
+const logger = require('../../src/plugins/logger');
+logger.setAdapter(require('../../src/adapters/logger'));
 
 describe('Logger', () => {
 
@@ -11,7 +12,7 @@ describe('Logger', () => {
     this.errorStub = sandbox.stub(console, 'error');
     this.writeStub = sandbox.stub(process.stdout, 'write');
   });
-  
+
   it('verbose', () => {
     logger.setLevel('VERBOSE');
     logger.trace('demo');
diff --git a/test/unit/settings.spec.js b/test/unit/settings.spec.js
index 036f1e2..778fb37 100644
--- a/test/unit/settings.spec.js
+++ b/test/unit/settings.spec.js
@@ -2,7 +2,7 @@ const expect = require('chai').expect;
 
 const settings = require('../../src/exports/settings');
 const config = require('../../src/config');
-const logger = require('../../src/exports/logger');
+const logger = require('../../src/adapters/logger');
 
 describe('Settings', () => {
 
@@ -12,7 +12,7 @@ describe('Settings', () => {
   });
 
   it('setLogger', () => {
-    settings.setLogger(logger.get());
+    settings.setLogger(logger);
   });
 
   after(() => {