test(doubleTap): cover constructor, verifier round-trip, and runner dispatch

This commit is contained in:
pj committed 2026-05-30 11:05:58 +05:30
1 parent fb085eeaa0
commit 87834caf96
4 files changed
+71

No files matched your search

+21
View File
@@ -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, `