Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vieiralucas committed Nov 20, 2024
1 parent b9102df commit 82a0871
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 56 deletions.
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "node ./dist/index.js",
"dev": "node nodemon.js",
"build": "tsc",
"test": "jest"
"test": "jest --passWithNoTests"
},
"dependencies": {
"@briefer/database": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/execution/batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ExecutionStatus,
YExecutionQueueItem,
} from './item.js'
import { exhaustiveCheck } from '@briefer/types'
import { exhaustiveCheck } from '../index.js'

export type YExecutionQueueBatchAttrs = {
version: 1
Expand Down
6 changes: 5 additions & 1 deletion packages/editor/src/execution/item.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { uuidSchema } from '@briefer/types'
import * as Y from 'yjs'
import * as z from 'zod'
import { validate as validateUUID } from 'uuid'

const uuidSchema = z.string().refine((uuid) => validateUUID(uuid), {
message: 'Invalid UUID format',
})

export const ExecutionQueueItemStatus = z.union([
z.object({
Expand Down
2 changes: 2 additions & 0 deletions packages/editor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,5 @@ export function getDataframe(

return df ?? null
}

export function exhaustiveCheck(_param: never) {}
29 changes: 0 additions & 29 deletions packages/editor/src/operations/blockGroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ describe('getTabsFromBlockGroupId', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -95,7 +94,6 @@ describe('getTabsFromBlockGroupId', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -104,7 +102,6 @@ describe('getTabsFromBlockGroupId', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -146,7 +143,6 @@ describe('ungroupTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -155,7 +151,6 @@ describe('ungroupTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -195,7 +190,6 @@ describe('ungroupTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -204,7 +198,6 @@ describe('ungroupTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -265,7 +258,6 @@ describe('ungroupTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -274,7 +266,6 @@ describe('ungroupTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -315,7 +306,6 @@ describe('ungroupTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -324,7 +314,6 @@ describe('ungroupTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -565,7 +554,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -574,7 +562,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -583,7 +570,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -618,7 +604,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -627,7 +612,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -636,7 +620,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -671,7 +654,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -680,7 +662,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -689,7 +670,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -724,7 +704,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -733,7 +712,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -742,7 +720,6 @@ describe('reorderTab', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -779,7 +756,6 @@ describe('removeBlock', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -788,7 +764,6 @@ describe('removeBlock', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -826,7 +801,6 @@ describe('removeBlock', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -835,7 +809,6 @@ describe('removeBlock', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down Expand Up @@ -873,7 +846,6 @@ describe('removeBlock', () => {
type: BlockType.RichText,
title: '',
isCurrent: false,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand All @@ -882,7 +854,6 @@ describe('removeBlock', () => {
type: BlockType.RichText,
title: '',
isCurrent: true,
execStatus: 'idle',
blockGroupId: blockGroup1Id,
isHiddenInPublished: false,
},
Expand Down
Loading

0 comments on commit 82a0871

Please sign in to comment.