chore: Test performance (#5786)

This commit is contained in:
Tom Moor
2023-09-06 17:19:21 -04:00
committed by GitHub
parent 3eb947e9a5
commit ec0564eb32
69 changed files with 449 additions and 617 deletions

View File

@@ -6,11 +6,8 @@ import {
buildCollection,
buildAdmin,
} from "@server/test/factories";
import { setupTestDatabase } from "@server/test/support";
import { serialize } from "./index";
setupTestDatabase();
describe("admin", () => {
it("should allow updating collection but not reading documents", async () => {
const team = await buildTeam();

View File

@@ -6,11 +6,8 @@ import {
buildDraftDocument,
buildCollection,
} from "@server/test/factories";
import { setupTestDatabase } from "@server/test/support";
import { serialize } from "./index";
setupTestDatabase();
describe("read_write collection", () => {
it("should allow read write permissions for member", async () => {
const team = await buildTeam();

View File

@@ -1,9 +1,6 @@
import { buildUser, buildTeam } from "@server/test/factories";
import { setupTestDatabase } from "@server/test/support";
import { serialize } from "./index";
setupTestDatabase();
it("should serialize policy", async () => {
const user = await buildUser();
const response = serialize(user, user);

View File

@@ -1,13 +1,7 @@
import { buildUser, buildTeam, buildAdmin } from "@server/test/factories";
import {
setCloudHosted,
setSelfHosted,
setupTestDatabase,
} from "@server/test/support";
import { setCloudHosted, setSelfHosted } from "@server/test/support";
import { serialize } from "./index";
setupTestDatabase();
it("should allow reading only", async () => {
await setSelfHosted();