test fixes

This commit is contained in:
Kristaps Fabians Geikins
2024-11-11 14:51:54 +02:00
parent ee16b083ba
commit d02ca824c3
5 changed files with 18 additions and 6 deletions
@@ -1298,7 +1298,7 @@ describe('Comments @comments', () => {
before(async () => {
// Truncate comments
truncateTables([Comments.name])
await truncateTables([Comments.name])
// Create a single comment with a blob
const createCommentResult = await createComment({
@@ -12,6 +12,7 @@ import { EventBusPayloads } from '@/modules/shared/services/eventBus'
import {
MaybeNullOrUndefined,
Nullable,
NullableKeysToOptional,
Optional,
PartialNullable,
StreamRoles,
@@ -22,11 +23,22 @@ import { WorkspaceTeam } from '@/modules/workspaces/domain/types'
import { Stream } from '@/modules/core/domain/streams/types'
import { TokenResourceIdentifier } from '@/modules/core/domain/tokens/types'
import { ServerRegion } from '@/modules/multiregion/domain/types'
import { SetOptional } from 'type-fest'
/** Workspace */
type UpsertWorkspaceArgs = {
workspace: Omit<Workspace, 'domains'>
workspace: Omit<
SetOptional<
NullableKeysToOptional<Workspace>,
| 'domainBasedMembershipProtectionEnabled'
| 'discoverabilityEnabled'
| 'defaultLogoIndex'
| 'defaultProjectRole'
| 'slug'
>,
'domains'
>
}
export type UpsertWorkspace = (args: UpsertWorkspaceArgs) => Promise<void>
@@ -161,7 +161,7 @@ describe('Workspace repositories', () => {
})
afterEach(async () => {
truncateTables(['workspaces'])
await truncateTables(['workspaces'])
})
it('returns all workspace members', async () => {
@@ -209,7 +209,7 @@ describe('Workspace repositories', () => {
})
afterEach(async () => {
truncateTables(['workspaces'])
await truncateTables(['workspaces'])
})
it('limits search results to specified workspace', async () => {
@@ -117,7 +117,7 @@ describe('Workspace SSO', () => {
})
afterEach(async () => {
truncateTables(['user_sso_sessions'])
await truncateTables(['user_sso_sessions'])
})
describe('given a workspace with SSO configured', () => {
@@ -251,7 +251,7 @@ describe('Workspace SSO repositories', () => {
})
afterEach(async () => {
truncateTables(['user_sso_sessions'])
await truncateTables(['user_sso_sessions'])
})
it('returns an empty array if there are no sessions', async () => {