alina sireneva
af54f6e1c3
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
27 lines
737 B
TypeScript
27 lines
737 B
TypeScript
import { describe, it } from 'node:test'
|
|
import { expect } from 'chai'
|
|
import { TelegramClient, User } from 'mtcute'
|
|
|
|
import { getApiParams } from './_utils.js'
|
|
|
|
describe('1. authorization', () => {
|
|
it('should authorize in default dc', async () => {
|
|
const tg = new TelegramClient(getApiParams('dc2.session'))
|
|
|
|
await tg.importSession(process.env.SESSION_DC2!)
|
|
|
|
expect(await tg.getMe()).to.be.instanceOf(User)
|
|
|
|
await tg.close()
|
|
})
|
|
|
|
it('should authorize in dc 1', async () => {
|
|
const tg = new TelegramClient(getApiParams('dc1.session'))
|
|
|
|
await tg.importSession(process.env.SESSION_DC1!)
|
|
|
|
expect(await tg.getMe()).to.be.instanceOf(User)
|
|
|
|
await tg.close()
|
|
})
|
|
})
|