pub enum Expectation {
Holds(Core),
PageContains {
needle: Core,
actor: Option<Arc<str>>,
route: Option<Arc<str>>,
},
PageMatchesSnapshot {
name: Option<Arc<str>>,
actor: Option<Arc<str>>,
route: Option<Arc<str>>,
},
FoldEquals {
events: Core,
actor: Option<Arc<str>>,
},
Place {
what: Arc<str>,
what_span: Span,
tier: Tier,
},
Flow {
ty: Arc<str>,
tier: Tier,
},
WireCompatible {
path: Arc<str>,
},
Performed {
atom: Effect,
how: Count,
},
}Variants§
Holds(Core)
expect <Bool>, with state, events and result in scope.
PageContains
expect page(session("bo")) contains "milk", and session("bo", "/done") for a route.
PageMatchesSnapshot
expect page matches snapshot / … matches snapshot "after checkout".
The rendered page is compared to a checked-in file rather than to a string in the test, so
the assertion is the whole page rather than the part somebody remembered to name. name is
None when the test’s own name keys it — the common case, and the one that keeps the
assertion one line long.
FoldEquals
expect state == fold_of [ … ].
Place
expect place(charge) == server.
Fields
what_span: SpanWhere charge is written. The name is a reference to a definition, resolved
against the placement table rather than evaluated, so there is no Core node carrying
its position — and an editor renaming that definition has to edit this too
(crate::editor::Editor::occurrences).
Flow
expect flow(ApiKey) reaches nothing on client.
WireCompatible
expect wire_compatible_with "orders.v1.becki".
Performed
expect no net.out / … once / … with Charge(amount=2000) — §21.3 rule 4.
Implementations§
Trait Implementations§
Source§impl Clone for Expectation
impl Clone for Expectation
Source§fn clone(&self) -> Expectation
fn clone(&self) -> Expectation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more