Repository: pactumjs/pactum (js)

Issue:
Typescript errors?
Is it because of my Typescript version, 4.5.4...? Or perhaps my general naivety....?

OS: Windows 10
NPM:  7.24.1
Node: v16.10.0
Typescript: 4.5.4
Pactum: 3.1.1

When my `tsconfig.js` has `"allowJs": true`, adding a JS file that just requires pactum causes the below:

```bash
node_modules/pactum/src/exports/expect.d.ts:39:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.
39 export = expect;
   ~~~~~~~~~~~~~~~~

node_modules/pactum/src/exports/reporter.d.ts:1:51 - error TS2440: Import declaration conflicts with local declaration of 'Interaction'.

1 import { InteractionRequest, InteractionResponse, Interaction } from './mock';
                                                    ~~~~~~~~~~~

node_modules/pactum/src/index.d.ts:5:25 - error TS2498: Module '"L:/src/foaf/node_modules/pactum/src/exports/expect"' uses 'export =' and cannot be used with 'export *'.

5 export * as expect from './exports/expect';
                          ~~~~~~~~~~~~~~~~~~

node_modules/pactum/src/index.d.ts:7:27 - error TS2307: Cannot find module './exports/matcher' or its corresponding type declarations.        

7 export * as matchers from './exports/matcher';
                            ~~~~~~~~~~~~~~~~~~~

node_modules/pactum/src/index.d.ts:15:25 - error TS2307: Cannot find module './exports/logger' or its corresponding type declarations.        

15 export * as logger from './exports/logger';
                           ~~~~~~~~~~~~~~~~~~

node_modules/pactum/src/models/Spec.d.ts:201:63 - error TS2314: Generic type 'Array<T>' requires 1 type argument(s).

201   withMultiPartFormData(key: string, value: string | Buffer | Array | ArrayBuffer, options?: FormData.AppendOptions): Spec;
                                                                  ~~~~~

node_modules/pactum/src/models/Spec.d.ts:398:19 - error TS2304: Cannot find name 'T'.

398   toss(): Promise<T>;
                      ~

Found 7 errors.
```

`tsconfig.json`:

```json
{
  "compilerOptions": {
    "target": "ES2017",
    "module": "commonjs",
    "allowJs": true,
    "sourceMap": true,
    "outDir": "dist",
    "strict": true,
    "lib": [
      "esnext",
    ],
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "moduleResolution": "node",
    "typeRoots": [
      "jest-fetch-mock",
      "./node_modules/@types",
      "./src/types"
    ],
    "baseUrl": ".",
    "paths": {
      "testlib/*": [
        "./test/lib/*"
      ],
      "src/*": [
        "./src/*"
      ]
    }
  }
}
```

Setting `"allowJs": false` solves the problem.

Pull request:
3.1.4
- add clone property in interaction
- fixed typescript bugs
- added parse function to process data management

closes #108 

Patch:
diff --git a/package-lock.json b/package-lock.json
index 1173c91..2ce989b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "pactum",
-  "version": "3.1.3",
+  "version": "3.1.4",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -299,9 +299,9 @@
       }
     },
     "@exodus/schemasafe": {
-      "version": "1.0.0-rc.4",
-      "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.0.0-rc.4.tgz",
-      "integrity": "sha512-zHISeJ5jcHSo3i2bI5RHb0XEJ1JGxQ/QQzU2FLPcJxohNohJV8jHCM1FSrOUxTspyDRSSULg3iKQa1FJ4EsSiQ=="
+      "version": "1.0.0-rc.6",
+      "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.0.0-rc.6.tgz",
+      "integrity": "sha512-dDnQizD94EdBwEj/fh3zPRa/HWCS9O5au2PuHhZBbuM3xWHxuaKzPBOEWze7Nn0xW68MIpZ7Xdyn1CoCpjKCuQ=="
     },
     "@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
@@ -568,9 +568,9 @@
       }
     },
     "camelcase": {
-      "version": "6.2.0",
-      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz",
-      "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==",
+      "version": "6.3.0",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+      "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
       "dev": true
     },
     "caniuse-lite": {
@@ -585,15 +585,16 @@
       "integrity": "sha512-CnSF1HD8vOOgNbE4P2fZEhdhfAohvpcF3DSdSvEcSHDAZvr+Xfw73isT8SXJJc3VMBqSwjXhr29/ikHUgFcypg=="
     },
     "chai": {
-      "version": "4.3.4",
-      "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz",
-      "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==",
+      "version": "4.3.6",
+      "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz",
+      "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==",
       "dev": true,
       "requires": {
         "assertion-error": "^1.1.0",
         "check-error": "^1.0.2",
         "deep-eql": "^3.0.1",
         "get-func-name": "^2.0.0",
+        "loupe": "^2.3.1",
         "pathval": "^1.1.1",
         "type-detect": "^4.0.5"
       }
@@ -626,9 +627,9 @@
       "dev": true
     },
     "chokidar": {
-      "version": "3.5.2",
-      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
-      "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
+      "version": "3.5.3",
+      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+      "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
       "dev": true,
       "requires": {
         "anymatch": "~3.1.2",
@@ -1229,9 +1230,9 @@
       "dev": true
     },
     "klona": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz",
-      "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA=="
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz",
+      "integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ=="
     },
     "lightcookie": {
       "version": "1.0.25",
@@ -1269,6 +1270,15 @@
         "is-unicode-supported": "^0.1.0"
       }
     },
+    "loupe": {
+      "version": "2.3.4",
+      "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz",
+      "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==",
+      "dev": true,
+      "requires": {
+        "get-func-name": "^2.0.0"
+      }
+    },
     "make-dir": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
@@ -1307,41 +1317,41 @@
       "dev": true
     },
     "mocha": {
-      "version": "9.1.2",
-      "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.2.tgz",
-      "integrity": "sha512-ta3LtJ+63RIBP03VBjMGtSqbe6cWXRejF9SyM9Zyli1CKZJZ+vfCTj3oW24V7wAphMJdpOFLoMI3hjJ1LWbs0w==",
+      "version": "9.2.0",
+      "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz",
+      "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==",
       "dev": true,
       "requires": {
         "@ungap/promise-all-settled": "1.1.2",
         "ansi-colors": "4.1.1",
         "browser-stdout": "1.3.1",
-        "chokidar": "3.5.2",
-        "debug": "4.3.2",
+        "chokidar": "3.5.3",
+        "debug": "4.3.3",
         "diff": "5.0.0",
         "escape-string-regexp": "4.0.0",
         "find-up": "5.0.0",
-        "glob": "7.1.7",
+        "glob": "7.2.0",
         "growl": "1.10.5",
         "he": "1.2.0",
         "js-yaml": "4.1.0",
         "log-symbols": "4.1.0",
         "minimatch": "3.0.4",
         "ms": "2.1.3",
-        "nanoid": "3.1.25",
+        "nanoid": "3.2.0",
         "serialize-javascript": "6.0.0",
         "strip-json-comments": "3.1.1",
         "supports-color": "8.1.1",
         "which": "2.0.2",
-        "workerpool": "6.1.5",
+        "workerpool": "6.2.0",
         "yargs": "16.2.0",
         "yargs-parser": "20.2.4",
         "yargs-unparser": "2.0.0"
       },
       "dependencies": {
         "debug": {
-          "version": "4.3.2",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
-          "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
+          "version": "4.3.3",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+          "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
           "dev": true,
           "requires": {
             "ms": "2.1.2"
@@ -1356,9 +1366,9 @@
           }
         },
         "glob": {
-          "version": "7.1.7",
-          "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
-          "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
+          "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
           "dev": true,
           "requires": {
             "fs.realpath": "^1.0.0",
@@ -1378,9 +1388,9 @@
       "dev": true
     },
     "nanoid": {
-      "version": "3.1.25",
-      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz",
-      "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==",
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz",
+      "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==",
       "dev": true
     },
     "nise": {
@@ -1706,9 +1716,9 @@
       }
     },
     "picomatch": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
-      "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+      "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
       "dev": true
     },
     "pkg-dir": {
@@ -2054,9 +2064,9 @@
       "dev": true
     },
     "workerpool": {
-      "version": "6.1.5",
-      "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz",
-      "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==",
+      "version": "6.2.0",
+      "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz",
+      "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==",
       "dev": true
     },
     "wrap-ansi": {
diff --git a/package.json b/package.json
index 00bc0e2..2a4cf1f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "pactum",
-  "version": "3.1.3",
+  "version": "3.1.4",
   "description": "REST API Testing Tool for all levels in a Test Pyramid",
   "main": "./src/index.js",
   "types": "./src/index.d.ts",
@@ -60,11 +60,11 @@
   "author": "Anudeep <asa.anudeep4@gmail.com>",
   "license": "MIT",
   "dependencies": {
-    "@exodus/schemasafe": "^1.0.0-rc.4",
+    "@exodus/schemasafe": "^1.0.0-rc.6",
     "deep-override": "^1.0.2",
     "form-data-lite": "^1.0.2",
     "json-query": "^2.2.2",
-    "klona": "^2.0.4",
+    "klona": "^2.0.5",
     "lightcookie": "^1.0.25",
     "openapi-fuzzer-core": "^1.0.6",
     "pactum-matchers": "^1.1.0",
@@ -73,8 +73,8 @@
     "polka": "^0.5.2"
   },
   "devDependencies": {
-    "chai": "^4.3.4",
-    "mocha": "^9.1.2",
+    "chai": "^4.3.6",
+    "mocha": "^9.2.0",
     "nyc": "^15.1.0",
     "sinon": "^10.0.0"
   },
diff --git a/src/exports/expect.d.ts b/src/exports/expect.d.ts
index 09671f1..51df7f4 100644
--- a/src/exports/expect.d.ts
+++ b/src/exports/expect.d.ts
@@ -1,4 +1,4 @@
-export interface Have {
+interface Have {
   status(code: number): void;
   header(key: string, value: any): void;
   headerContains(key: string, value: any): void;
@@ -25,11 +25,11 @@ export interface Have {
   _(handler: string, data: any): Promise<void>;
 }
 
-export interface To {
+interface To {
   have: Have;
 }
 
-export interface Expect {
+interface Expect {
   to: To;
   should: To;
 }
diff --git a/src/exports/mock.d.ts b/src/exports/mock.d.ts
index 5dea0aa..8b9cdbe 100644
--- a/src/exports/mock.d.ts
+++ b/src/exports/mock.d.ts
@@ -51,6 +51,7 @@ export interface Interaction {
   flow?: string;
   strict?: boolean;
   background?: boolean;
+  clone?: boolean;
   request: InteractionRequest;
   response: InteractionResponse;
   expects?: InteractionExpectations;
diff --git a/src/exports/reporter.d.ts b/src/exports/reporter.d.ts
index ac9e07e..6887b9f 100644
--- a/src/exports/reporter.d.ts
+++ b/src/exports/reporter.d.ts
@@ -1,4 +1,4 @@
-import { InteractionRequest, InteractionResponse, Interaction } from './mock';
+import { InteractionRequest, Interaction } from './mock';
 
 export interface SpecRequest {
   method: string;
@@ -19,9 +19,7 @@ export interface InteractionCall {
   exercisedAt: string;
 }
 
-export interface Interaction {
-  request: InteractionRequest;
-  response: InteractionResponse;
+export interface ExercisedInteraction extends Interaction {
   calls: InteractionCall[];
 }
 
@@ -36,7 +34,7 @@ export interface SpecData {
   request: SpecRequest;
   response?: SpecResponse;
   recorded?: object;
-  interactions: Interaction[];
+  interactions: ExercisedInteraction[];
 }
 
 export interface Reporter {
@@ -44,7 +42,7 @@ export interface Reporter {
   afterSpec(data: SpecData): void;
   afterStep(data: object): void;
   afterTest(data: object): void;
-  afterInteraction(data: Interaction): void;
+  afterInteraction(data: ExercisedInteraction): void;
   end(): void | Promise<void>
 }
 
diff --git a/src/index.d.ts b/src/index.d.ts
index a73edbd..7f3694b 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -2,9 +2,10 @@ import * as Spec from './models/Spec';
 import * as Fuzz from './models/Fuzz';
 import * as E2E from './models/E2E';
 
-export * as expect from './exports/expect';
+import expect from './exports/expect';
+export { expect };
+
 export * as handler from './exports/handler';
-export * as matchers from './exports/matcher';
 export * as mock from './exports/mock';
 export * as reporter from './exports/reporter';
 export * as request from './exports/request';
@@ -12,7 +13,6 @@ export * as response from './exports/response';
 export * as settings from './exports/settings';
 export * as stash from './exports/stash';
 export * as state from './exports/state';
-export * as logger from './exports/logger';
 
 /**
  * returns an instance of a spec
@@ -46,4 +46,6 @@ export function sleep(ms: number): Promise<void>;
 
 export function clone<T>(input: T): T;
 
+export function parse(data: any): any;
+
 export namespace pactum { }
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 116e1e4..d20047f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -22,6 +22,14 @@ const stash = require('./exports/stash');
 const expect = require('./exports/expect');
 const reporter = require('./exports/reporter');
 
+const processor = require('./helpers/dataProcessor');
+
+function parse(data) {
+  processor.processMaps();
+  processor.processTemplates();
+  return processor.processData(data);
+}
+
 const pactum = {
 
   mock,
@@ -59,7 +67,9 @@ const pactum = {
 
   clone(value) {
     return klona(value);
-  }
+  },
+
+  parse
 
 };
 
diff --git a/src/models/Interaction.model.js b/src/models/Interaction.model.js
index cba3b7e..5fe514c 100644
--- a/src/models/Interaction.model.js
+++ b/src/models/Interaction.model.js
@@ -2,6 +2,7 @@ const { setMatchingRules, getValue } = require('pactum-matchers').utils;
 const processor = require('../helpers/dataProcessor');
 const helper = require('../helpers/helper');
 const { PactumInteractionError } = require('../helpers/errors');
+const { klona: clone } = require('klona');
 const ALLOWED_REQUEST_METHODS = new Set([
   'GET',
   'POST',
@@ -188,6 +189,9 @@ class InteractionExpectations {
 class Interaction {
   constructor(raw) {
     let unprocessedResponse;
+    if (raw && raw.clone) {
+      raw = clone(raw);
+    }
     if (raw && raw.response) {
       unprocessedResponse = raw.response;
       delete raw.response;
diff --git a/src/models/Spec.d.ts b/src/models/Spec.d.ts
index b583adc..d80b50f 100644
--- a/src/models/Spec.d.ts
+++ b/src/models/Spec.d.ts
@@ -198,7 +198,7 @@ declare class Spec {
    * @see https://www.npmjs.com/package/form-data-lite
    * @see https://pactumjs.github.io/#/request-making?id=form-data
    */
-  withMultiPartFormData(key: string, value: string | Buffer | Array | ArrayBuffer, options?: FormData.AppendOptions): Spec;
+  withMultiPartFormData(key: string, value: string | Buffer | Array<any> | ArrayBuffer, options?: FormData.AppendOptions): Spec;
 
   /**
    * with http core options
@@ -395,7 +395,7 @@ declare class Spec {
    * executes the test case
    * @see https://pactumjs.github.io/#/api-testing
    */
-  toss(): Promise<T>;
+  toss(): Promise<any>;
 
   /**
    * returns chai like assertions


Test patch:
diff --git a/test/component/interactions.clone.spec.js b/test/component/interactions.clone.spec.js
new file mode 100644
index 0000000..c6deed3
--- /dev/null
+++ b/test/component/interactions.clone.spec.js
@@ -0,0 +1,34 @@
+const { spec } = require('../../src/index');
+const { like } = require('pactum-matchers');
+const { expect } = require('chai');
+
+describe('Interactions - Clone', () => {
+
+  const user = {
+    name: like('guest')
+  };
+
+  it('should clone the data', async () => {
+    await spec()
+      .useInteraction({
+        clone: true,
+        request: {
+          method: 'POST',
+          path: '/api/users',
+          body: user
+        },
+        response: {
+          status: 200,
+          body: user
+        }
+      })
+      .post('http://localhost:9393/api/users')
+      .withJson({
+        name: 'guest'
+      })
+      .expectStatus(200);
+    expect(user).deep.equals({ name: { value: 'guest', pactum_type: 'LIKE' } });
+  });
+
+
+});
\ No newline at end of file
diff --git a/test/unit/parse.spec.js b/test/unit/parse.spec.js
new file mode 100644
index 0000000..f9f6fa4
--- /dev/null
+++ b/test/unit/parse.spec.js
@@ -0,0 +1,38 @@
+const { parse, stash } = require('../../src');
+const expect = require('chai').expect;
+
+const config = require('../../src/config');
+
+describe('parse', () => {
+
+  after(() => {
+    config.data.template.enabled = false;
+    config.data.template.processed = false;
+    stash.clearDataTemplates();
+    stash.clearDataMaps();
+  })
+
+  it('no data', () => {
+    const actual = parse();
+    expect(actual).to.be.undefined;
+  });
+
+  it('string', () => {
+    const actual = parse('hi mom');
+    expect(actual).to.be.equals('hi mom');
+  });
+
+  it('data map', () => {
+    stash.addDataMap({ 'User': 'guest' });
+    const actual = parse('$M{User}');
+    expect(actual).to.be.equals('guest');
+  });
+
+  it('data template', () => {
+    stash.addDataTemplate({ 'User': { name: 'guest' } });
+    const actual = parse({ '@DATA:TEMPLATE@': 'User' });
+    expect(actual).deep.equals({ name: 'guest' });
+  });
+
+});
+