From d37aa0609dbaf21c34568633958c2bc17d3dc26a Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Thu, 8 Nov 2018 21:11:41 +0100
Subject: [PATCH] [enh] Also export Test tools

---
 index.ts                              | 2 ++
 test/integration/tools/http-expect.ts | 2 +-
 test/unit-tools.ts                    | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/index.ts b/index.ts
index 843cf42a4..a8f548813 100644
--- a/index.ts
+++ b/index.ts
@@ -614,3 +614,5 @@ export const Duniter = {
   }
 }
 
+export * from './test/unit-tools'
+export * from './test/integration/tools/toolbox'
diff --git a/test/integration/tools/http-expect.ts b/test/integration/tools/http-expect.ts
index 141650719..26444a99c 100644
--- a/test/integration/tools/http-expect.ts
+++ b/test/integration/tools/http-expect.ts
@@ -59,7 +59,7 @@ export async function expectJSON<T>(promise:Promise<T>, json:any) {
   try {
     const resJson = await promise;
     Underscore.keys(json).forEach(function(key){
-      resJson.should.have.property(String(key)).equal(json[key]);
+      (resJson as any).should.have.property(String(key)).equal(json[key]);
     });
   } catch (err) {
     if (err.response) {
diff --git a/test/unit-tools.ts b/test/unit-tools.ts
index f27b551d0..c154cc34c 100644
--- a/test/unit-tools.ts
+++ b/test/unit-tools.ts
@@ -12,6 +12,7 @@
 // GNU Affero General Public License for more details.
 
 import * as assert from 'assert'
+const should = require('should')
 
 export async function shouldThrow(promise:Promise<any>) {
   let error = false
@@ -20,8 +21,8 @@ export async function shouldThrow(promise:Promise<any>) {
   } catch (e) {
     error = true
   }
-  promise.should.be.rejected()
-  error.should.equal(true)
+  (promise as any).should.be.rejected()
+  (error as any).should.equal(true)
 }
 
 export async function shouldNotFail<T>(promise:Promise<T>) {
-- 
GitLab