Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hyoo-ru/mam_mol into fix-run
Browse files Browse the repository at this point in the history
  • Loading branch information
zerkalica committed Nov 26, 2024
2 parents 84c1e4a + 93fae5c commit 237a60e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion portion/portion.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ $mol_portion_indicator $mol_view
$mol_portion $mol_view
portion 0
sub /
<= indicator $mol_portion_indicator
<= Indicator $mol_portion_indicator
width_style <= indicator_width_style \0
7 changes: 6 additions & 1 deletion state/arg/arg.web.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ namespace $ {
@ $mol_mem
static href( next? : string ) { return next || '' }

@ $mol_action
static go( next : { [ key : string ] : string | null } ) {
this.href( this.link( next ) )
}

}
context.$mol_state_arg = $mol_state_arg_mock
} )
Expand All @@ -17,7 +22,7 @@ namespace $ {
'args as dictionary'( $ ) {

$.$mol_state_arg.href( '#!foo=bar/xxx' )
$mol_assert_like( $.$mol_state_arg.dict() , { foo : 'bar' , xxx : '' } )
$mol_assert_equal( $.$mol_state_arg.dict() , { foo : 'bar' , xxx : '' } )

$.$mol_state_arg.dict({ foo : null , yyy : '' , lol : '123' })
$mol_assert_equal( $.$mol_state_arg.href().replace( /.*#/ , '#' ) , '#!yyy/lol=123' )
Expand Down
8 changes: 8 additions & 0 deletions wait/rest/rest.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace $.$$ {

$mol_test_mocks.push( $ => {
$.$mol_wait_timeout = function $mol_wait_timeout_mock( this: $, timeout: number ) { }
$.$mol_wait_timeout_async = async function $mol_wait_timeout_async_mock( this: $, timeout: number ) {}
} )

}
8 changes: 8 additions & 0 deletions wait/timeout/timeout.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace $.$$ {

$mol_test_mocks.push( $ => {
$.$mol_wait_rest = function $mol_wait_rest_mock( this: $ ) { }
$.$mol_wait_rest_async = async function $mol_wait_rest_async_mock( this: $ ) {}
} )

}
2 changes: 1 addition & 1 deletion wait/timeout/timeout.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace $ {

export function $mol_wait_timeout_async( this: $, timeout: number ) {
export function $mol_wait_timeout_async( this: $, timeout: number ): Promise< void > {
const promise = $mol_promise()
const task = new this.$mol_after_timeout( timeout , ()=> promise.done() )
return Object.assign( promise, {
Expand Down
12 changes: 6 additions & 6 deletions wire/async/async.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace $ {

static send( next: string ) {
$mol_wire_sync( this.first ).push( next )
this.$.$mol_wait_timeout(0)
$$.$mol_wait_timeout(0)
this.last.push( next )
}

Expand All @@ -39,8 +39,8 @@ namespace $ {
$.$mol_after_mock_warp()
await promise

$mol_assert_like( NameLogger.first, [ 'john', 'jin' ] )
$mol_assert_like( NameLogger.last, [ 'jin' ] )
$mol_assert_equal( NameLogger.first, [ 'john', 'jin' ] )
$mol_assert_equal( NameLogger.last, [ 'jin' ] )

},

Expand All @@ -51,7 +51,7 @@ namespace $ {

function send_name( next: string ) {
$mol_wire_sync( first ).push( next )
$.$mol_wait_timeout(0)
$$.$mol_wait_timeout(0)
last.push( next )
}

Expand All @@ -63,8 +63,8 @@ namespace $ {
$.$mol_after_mock_warp()
await promise

$mol_assert_like( first, [ 'john', 'jin' ] )
$mol_assert_like( last, [ 'jin' ] )
$mol_assert_equal( first, [ 'john', 'jin' ] )
$mol_assert_equal( last, [ 'jin' ] )

},

Expand Down

0 comments on commit 237a60e

Please sign in to comment.