-- 폼 제출 테스트: 핸들러 안에서 FormData 를 객체로 바꿔 비교한다
submitted :: Form -> Map Name Value
submitted = fromEntries . entries . formData -- new FormData(e.target) → Object.fromEntries
test = do
change "아이디" "testuser" ; change "비밀번호" "password" ; click "로그인"
submitted form `shouldBe` fromList [("username", "testuser"), ("password", "password")]
handleSubmit `shouldHaveBeenCalled` () -- preventDefault 는 핸들러 안에서