From 0350375fae73c63aed3334b3293c644b02aff80b Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 23 Jan 2020 10:39:51 +0000 Subject: [PATCH] updating test files to use common module --- package-lock.json | 5 ----- package.json | 4 +--- packages/core/test/nodeCrypto.js | 14 -------------- packages/core/test/specHelpers.js | 2 +- 4 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 packages/core/test/nodeCrypto.js diff --git a/package-lock.json b/package-lock.json index 4bc29fbdd4..8844d9a0ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1356,11 +1356,6 @@ "tweetnacl": "^0.14.3" } }, - "bcryptjs": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", - "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" - }, "before-after-hook": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", diff --git a/package.json b/package.json index f7c24bc19c..64aa1aea0d 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,7 @@ "devDependencies": { "lerna": "^3.14.1" }, - "dependencies": { - "bcryptjs": "^2.4.3" - }, + "dependencies": {}, "scripts": { "bootstrap": "lerna bootstrap", "build": "lerna run build", diff --git a/packages/core/test/nodeCrypto.js b/packages/core/test/nodeCrypto.js deleted file mode 100644 index 5ddf188e81..0000000000 --- a/packages/core/test/nodeCrypto.js +++ /dev/null @@ -1,14 +0,0 @@ -import bcrypt from "bcryptjs"; - -function hash(password) { - return bcrypt.hashSync(password, 10); -} - -function verify(password, hash) { - return bcrypt.compareSync(password, hash); -} - - -export default { - hash, verify -}; \ No newline at end of file diff --git a/packages/core/test/specHelpers.js b/packages/core/test/specHelpers.js index 2a0d6449d6..e1d823fb14 100644 --- a/packages/core/test/specHelpers.js +++ b/packages/core/test/specHelpers.js @@ -17,7 +17,7 @@ import {createBehaviourSources} from "../src/actionsApi/buildBehaviourSource"; import {createAction, createTrigger} from "../src/templateApi/createActions"; import {initialiseActions} from "../src/actionsApi/initialise"; import {cleanup} from "../src/transactions/cleanup"; -import nodeCrypto from "./nodeCrypto"; +import { crypto as nodeCrypto } from "@budibase/core"; import {permission} from "../src/authApi/permissions"; import {generateFullPermissions} from "../src/authApi/generateFullPermissions" import {initialiseData} from "../src/appInitialise/initialiseData";