updating test files to use common module

This commit is contained in:
Martin McKeaveney 2020-01-23 10:39:51 +00:00
parent 37b1a507ea
commit 0350375fae
4 changed files with 2 additions and 23 deletions

5
package-lock.json generated
View File

@ -1356,11 +1356,6 @@
"tweetnacl": "^0.14.3" "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": { "before-after-hook": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",

View File

@ -4,9 +4,7 @@
"devDependencies": { "devDependencies": {
"lerna": "^3.14.1" "lerna": "^3.14.1"
}, },
"dependencies": { "dependencies": {},
"bcryptjs": "^2.4.3"
},
"scripts": { "scripts": {
"bootstrap": "lerna bootstrap", "bootstrap": "lerna bootstrap",
"build": "lerna run build", "build": "lerna run build",

View File

@ -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
};

View File

@ -17,7 +17,7 @@ import {createBehaviourSources} from "../src/actionsApi/buildBehaviourSource";
import {createAction, createTrigger} from "../src/templateApi/createActions"; import {createAction, createTrigger} from "../src/templateApi/createActions";
import {initialiseActions} from "../src/actionsApi/initialise"; import {initialiseActions} from "../src/actionsApi/initialise";
import {cleanup} from "../src/transactions/cleanup"; import {cleanup} from "../src/transactions/cleanup";
import nodeCrypto from "./nodeCrypto"; import { crypto as nodeCrypto } from "@budibase/core";
import {permission} from "../src/authApi/permissions"; import {permission} from "../src/authApi/permissions";
import {generateFullPermissions} from "../src/authApi/generateFullPermissions" import {generateFullPermissions} from "../src/authApi/generateFullPermissions"
import {initialiseData} from "../src/appInitialise/initialiseData"; import {initialiseData} from "../src/appInitialise/initialiseData";