update actor doc and add more actor based tests
This commit is contained in:
13
tests/actor_start.ce
Normal file
13
tests/actor_start.ce
Normal file
@@ -0,0 +1,13 @@
|
||||
// Test: $start lifecycle events (greet and stop)
|
||||
var got_greet = false
|
||||
$start(function(event) {
|
||||
if (event.type == 'greet') {
|
||||
if (!event.actor) disrupt
|
||||
if (!is_actor(event.actor)) disrupt
|
||||
got_greet = true
|
||||
}
|
||||
if (event.type == 'stop') {
|
||||
if (!got_greet) disrupt
|
||||
$stop()
|
||||
}
|
||||
}, 'tests/actor_helper_stop')
|
||||
Reference in New Issue
Block a user