updating test files to use common module
This commit is contained in:
parent
f15ffa59e3
commit
4b76c73df7
|
@ -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",
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"devDependencies": {
|
||||
"lerna": "^3.14.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bcryptjs": "^2.4.3"
|
||||
},
|
||||
"dependencies": {},
|
||||
"scripts": {
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"build": "lerna run build",
|
||||
|
|
|
@ -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
|
||||
};
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue