Test::Async::Event
– collection of standard events
use Test::Async::Event;
test-bundle MyBundle {
method foo(Str:D $message) is test-tool {
self.send-test: Event::Ok, :$message
}
}
General information about Test::Async
event management can be found in Test::Async::Manual
.
Events are objects of classes derived from Event
class. This module provides support for Test::Async
core. In general, all event classes can be conventionally split into the following groups:
-
informative – events signalling about some state changes. Like, for example, suite termination.
-
reporting - events bearing a message to be reported to user.
-
commands – those which tell the core to perform an action.
-
tests – outcomes of individual test tools.
The base event class.
-
$.origin
– event originating object. Defaults to the current test suite object. -
Int:D $.id
– event id, a sequential number. -
Instant:D $.time
– the moment when event object was created.
-
Profile
– returns aMap
suitable for passing to an event constructor. The method collects all changed public attributes of an object. -
gist
,Str
– stringify event object for reporting.
A bundle of events used internally for commands. See Test::Async::Hub
and possibly other modules. The set of command events is not standartized and subject for changes.
(c) 2020-2023, Vadim Belman [email protected]
Artistic License 2.0
See the LICENSE file in th