Skip to content

Commit

Permalink
test: 💍 removed broken code from test
Browse files Browse the repository at this point in the history
  • Loading branch information
emilcardell committed Oct 25, 2024
1 parent ef8b807 commit ec61e45
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions packages/pubsub/src/lib/subscriber.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { PubSub, type Subscription, type Topic } from '@google-cloud/pubsub'
import type { Schema } from 'avsc'
import { type MockedObject, afterAll, describe, expect, it, vi } from 'vitest'
import { z } from 'zod'
import { createSubscriber } from './subscriber'

const exampleSchema = z.object({
messageType: z.string(),
created: z.date(),
data: z.string().optional(),
})
type ExampleMessage = {
messageType: string
message: string
}

const message = {
messageType: 'type of message',
message: 'message data',
} satisfies ExampleMessage

type ExampleMessage = z.infer<typeof exampleSchema>
type ExamplePubsubChannels = {
example: ExampleMessage
}
Expand Down Expand Up @@ -71,15 +73,6 @@ vi.mock('@google-cloud/pubsub', () => {
}
})

const description = 'This is an example message'
const zodValue = z.object(
{
messageType: z.string(),
message: z.number(),
},
{ description }
)

describe('subscriber', () => {
const topicName = 'example'
const subscriptionName = 'example-subscription'
Expand Down

0 comments on commit ec61e45

Please sign in to comment.