18 lines
502 B
Plaintext
18 lines
502 B
Plaintext
return {
|
|
test_kill: function() {
|
|
$_.start(e => {
|
|
log.console(`got message from hanger: ${e.type}`)
|
|
if (e.type == 'greet')
|
|
$_.delay(_ => {
|
|
log.console(`sending stop message to hanger`)
|
|
$_.stop(e.actor)
|
|
}, 1)
|
|
|
|
if (e.type == 'disrupt') {
|
|
log.console(`underling successfully killed.`)
|
|
// $_.stop() // Removed for module test
|
|
}
|
|
}, 'tests/hang_actor')
|
|
}
|
|
}
|