diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 481bbc97bf..17fafdc352 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -16,7 +16,7 @@ "prepack": "cp package.json dist", "build": "tsc -p tsconfig.build.json", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "test": "jest --coverage", + "test": "jest --coverage --maxWorkers=2", "test:watch": "jest --watchAll" }, "dependencies": { diff --git a/packages/worker/package.json b/packages/worker/package.json index 2c9c5b470f..a63d0ad030 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -22,7 +22,7 @@ "build:docker": "docker build . -t worker-service --label version=$BUDIBASE_RELEASE_VERSION", "dev:stack:init": "node ./scripts/dev/manage.js init", "dev:builder": "npm run dev:stack:init && nodemon", - "test": "jest --coverage --runInBand", + "test": "jest --coverage --maxWorkers=2", "test:watch": "jest --watch", "env:multi:enable": "node scripts/multiTenancy.js enable", "env:multi:disable": "node scripts/multiTenancy.js disable", diff --git a/packages/worker/src/api/routes/global/tests/users.spec.ts b/packages/worker/src/api/routes/global/tests/users.spec.ts index d46748e1b1..9aa5b5ab5c 100644 --- a/packages/worker/src/api/routes/global/tests/users.spec.ts +++ b/packages/worker/src/api/routes/global/tests/users.spec.ts @@ -276,7 +276,7 @@ describe("/api/global/users", () => { await config.createSession(nonAdmin) const newUser = structures.users.user() - await api.users.saveUser(newUser, 403, config.authHeaders(nonAdmin)) + await config.api.users.saveUser(newUser, 403, config.authHeaders(nonAdmin)) }) }) @@ -440,7 +440,7 @@ describe("/api/global/users", () => { const nonAdmin = await config.createUser(structures.users.builderUser()) await config.createSession(nonAdmin) - await api.users.saveUser(existingUser, 200, config.authHeaders(nonAdmin)) + await config.api.users.saveUser(existingUser, 200, config.authHeaders(nonAdmin)) }) })