From b892723732683701a00bc9019bf954bf8afa8a4a Mon Sep 17 00:00:00 2001 From: Stefan Zerkalica Date: Tue, 3 Oct 2023 22:07:43 +0300 Subject: [PATCH] $mol_wire_async fix async test --- wire/async/async.test.ts | 13 +++++-------- wire/sync/sync.test.ts | 8 +++----- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/wire/async/async.test.ts b/wire/async/async.test.ts index 06387221850..86cf4fec124 100644 --- a/wire/async/async.test.ts +++ b/wire/async/async.test.ts @@ -1,23 +1,20 @@ namespace $ { $mol_test({ - 'test types'( $ ) { class A { - a() { + static a() { return '' } - b() { + static b() { return $mol_wire_async(this).a() } } - - const a = new A() - const b = a.b() - type Check = $mol_type_assert> + + type Check = $mol_type_assert, Promise> }, - 'Latest method calls wins'( $ ) { + async 'Latest method calls wins'( $ ) { class NameLogger extends $mol_object2 { diff --git a/wire/sync/sync.test.ts b/wire/sync/sync.test.ts index 912e69bf9a9..7197e8b949c 100644 --- a/wire/sync/sync.test.ts +++ b/wire/sync/sync.test.ts @@ -4,18 +4,16 @@ namespace $ { 'test types'( $ ) { class A { - a() { + static a() { return Promise.resolve('') } - b() { + static b() { return $mol_wire_sync(this).a() } } - const a = new A() - const b = a.b() - type Check = $mol_type_assert + type Check = $mol_type_assert, string> }, })