mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
test(doubleTap): cover constructor, verifier round-trip, and runner dispatch
This commit is contained in:
1 parent
fb085eeaa0
commit
87834caf96
4 files changed
+71
No files matched your search
@@ -282,6 +282,27 @@ func TestNextAction_NoSetupRegistered(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDoubleTap_RoundTrip(t *testing.T) {
|
||||
verifier := newVerifier(t)
|
||||
mustLoad(t, verifier, `
|
||||
globalThis.actions = __sanderling__.actions(() => [
|
||||
__sanderling__.doubleTap({ on: "id:save" }),
|
||||
]);
|
||||
`)
|
||||
_ = verifier.PushSnapshot(SnapshotInput{Snapshots: Snapshots{}})
|
||||
|
||||
action, err := verifier.NextAction()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if action.Kind != ActionKindDoubleTap {
|
||||
t.Errorf("kind: got %v, want DoubleTap", action.Kind)
|
||||
}
|
||||
if action.On != "id:save" {
|
||||
t.Errorf("selector: got %q, want id:save", action.On)
|
||||
}
|
||||
}
|
||||
|
||||
func TestInputText_RoundTrip(t *testing.T) {
|
||||
verifier := newVerifier(t)
|
||||
mustLoad(t, verifier, `
|
||||
|
||||
Reference in new issue
Block a user