mtcute/e2e/tests/_worker.ts
alina sireneva af54f6e1c3
test(e2e): massive rework of e2e tests
now they run as-is, without any bundling. this might seem like a downgrade, but we no longer really need to verify that we publish stuff correctly as we delegate that to `@fuman/build`

meow
2024-12-07 09:08:30 +03:00

17 lines
507 B
TypeScript

import type { WorkerCustomMethods } from 'mtcute'
import { BaseTelegramClient, TelegramWorker } from 'mtcute'
import { getApiParams } from './_utils.ts'
const customMethods = {
hello: async () => 'world',
sum: async (a: number, b: number) => a + b,
} as const satisfies WorkerCustomMethods
export type CustomMethods = typeof customMethods
const client = new BaseTelegramClient(getApiParams('dc1.session'))
// eslint-disable-next-line no-new
new TelegramWorker({
client,
customMethods,
})