Fixing issue with db init as part of the jest require.
This commit is contained in:
parent
d736e558f9
commit
bcee277acb
|
@ -1,10 +1,14 @@
|
||||||
mockAuthWithNoCookie()
|
mockAuthWithNoCookie()
|
||||||
mockWorker()
|
mockWorker()
|
||||||
|
|
||||||
jest.mock("@budibase/backend-core/db", () => ({
|
jest.mock("@budibase/backend-core/db", () => {
|
||||||
...jest.requireActual("@budibase/backend-core/db"),
|
const coreDb = jest.requireActual("@budibase/backend-core/db")
|
||||||
|
coreDb.init()
|
||||||
|
return {
|
||||||
|
...coreDb,
|
||||||
dbExists: () => true,
|
dbExists: () => true,
|
||||||
}))
|
}
|
||||||
|
})
|
||||||
|
|
||||||
function mockWorker() {
|
function mockWorker() {
|
||||||
jest.mock("../../utilities/workerRequests", () => ({
|
jest.mock("../../utilities/workerRequests", () => ({
|
||||||
|
|
|
@ -1014,10 +1014,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@1.0.105-alpha.42":
|
"@budibase/backend-core@1.0.105-alpha.43":
|
||||||
version "1.0.105-alpha.42"
|
version "1.0.105-alpha.43"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.105-alpha.42.tgz#732daf9234312261c91158303459bb02f95656e0"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.105-alpha.43.tgz#9790310c2758867b958f6c4a8313e9fbd2a4df4e"
|
||||||
integrity sha512-takLU6UcUVVzcF8EZEazxmY37Th8DwjG8CEtBrlYZn+yrAO+27XixOws72P+6Xr9IxGyAWxMpIQ8E5uZi6Zl9w==
|
integrity sha512-pS2VmSPi/i+r4EjsG4WszQ2VeIssu+ugVgl1O+oXA8/acPMWSWv1ct3JKrckz3sdKiSjllXhy+B4ZPvfN1Ezpg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@techpass/passport-openidconnect" "^0.3.0"
|
"@techpass/passport-openidconnect" "^0.3.0"
|
||||||
aws-sdk "^2.901.0"
|
aws-sdk "^2.901.0"
|
||||||
|
@ -1087,12 +1087,12 @@
|
||||||
svelte-flatpickr "^3.2.3"
|
svelte-flatpickr "^3.2.3"
|
||||||
svelte-portal "^1.0.0"
|
svelte-portal "^1.0.0"
|
||||||
|
|
||||||
"@budibase/pro@1.0.105-alpha.42":
|
"@budibase/pro@1.0.105-alpha.43":
|
||||||
version "1.0.105-alpha.42"
|
version "1.0.105-alpha.43"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.105-alpha.42.tgz#b616b24d9008c268f87b532b89493670d5a0a915"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.105-alpha.43.tgz#0f90aa8570d789b8a69acf3895b6af036e32cc75"
|
||||||
integrity sha512-ibiJRm+22B4t8XZVkDQz8RU8Jd3XSS0M0K8vLRqdFaB632Vt/dnnMx6GbUvurjSfqxsa72R2+jNOME64oUl0Gg==
|
integrity sha512-fz9JbHcWMsu2lHt7rH6HZqx6SosKjwKF2CUH3FMQgtQqCjJfe58GIPXgLh/eLT8O8Eq2F46HzRjABlqMUFjQSw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "1.0.105-alpha.42"
|
"@budibase/backend-core" "1.0.105-alpha.43"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
|
|
||||||
"@budibase/standard-components@^0.9.139":
|
"@budibase/standard-components@^0.9.139":
|
||||||
|
|
Loading…
Reference in New Issue