fix: tests

This commit is contained in:
alina 🌸 2023-10-26 23:54:04 +03:00
parent 4ac6e439a9
commit f3609fedca
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -12,7 +12,7 @@ describe('Dispatcher', () => {
describe('Raw updates', () => { describe('Raw updates', () => {
it('registers and unregisters handlers for raw updates', async () => { it('registers and unregisters handlers for raw updates', async () => {
const dp = new Dispatcher(client) const dp = Dispatcher.for(client)
const log: string[] = [] const log: string[] = []
dp.onRawUpdate((cl, upd) => { dp.onRawUpdate((cl, upd) => {
@ -34,7 +34,7 @@ describe('Dispatcher', () => {
}) })
it('supports filters for raw updates', async () => { it('supports filters for raw updates', async () => {
const dp = new Dispatcher(client) const dp = Dispatcher.for(client)
const log: string[] = [] const log: string[] = []
@ -72,7 +72,7 @@ describe('Dispatcher', () => {
describe('Filter groups', () => { describe('Filter groups', () => {
it('does separate propagation for filter groups', async () => { it('does separate propagation for filter groups', async () => {
const dp = new Dispatcher(client) const dp = Dispatcher.for(client)
const log: string[] = [] const log: string[] = []
@ -99,7 +99,7 @@ describe('Dispatcher', () => {
}) })
it('allows continuing propagation in the same group with ContinuePropagation', async () => { it('allows continuing propagation in the same group with ContinuePropagation', async () => {
const dp = new Dispatcher(client) const dp = Dispatcher.for(client)
const log: string[] = [] const log: string[] = []
@ -132,7 +132,7 @@ describe('Dispatcher', () => {
}) })
it('allows stopping any further propagation with Stop', async () => { it('allows stopping any further propagation with Stop', async () => {
const dp = new Dispatcher(client) const dp = Dispatcher.for(client)
const log: string[] = [] const log: string[] = []
@ -168,8 +168,8 @@ describe('Dispatcher', () => {
describe('Children', () => { describe('Children', () => {
it('should call children handlers after own handlers', async () => { it('should call children handlers after own handlers', async () => {
const dp = new Dispatcher(client) const dp = Dispatcher.for(client)
const child = new Dispatcher() const child = Dispatcher.child()
dp.addChild(child) dp.addChild(child)
const log: string[] = [] const log: string[] = []
@ -188,8 +188,8 @@ describe('Dispatcher', () => {
}) })
it('should have separate handler groups for children', async () => { it('should have separate handler groups for children', async () => {
const dp = new Dispatcher(client) const dp = Dispatcher.for(client)
const child = new Dispatcher() const child = Dispatcher.child()
dp.addChild(child) dp.addChild(child)
const log: string[] = [] const log: string[] = []