Add comment describing logger

Added a comment explaining how to enable logging in expect-based tests by using expect.WithLogger. This helps developers debug by printing characters read to stdout.
This commit is contained in:
Kynan Ware 2025-12-12 11:48:58 -07:00
parent 7e7f8c6f6e
commit 38578f7991

View file

@ -803,6 +803,8 @@ func newTestVirtualTerminal(t *testing.T) *expect.Console {
failOnExpectError(t),
failOnSendError(t),
expect.WithDefaultTimeout(time.Second),
// Use this logger to debug expect based tests by printing the
// characters being read to stdout.
// expect.WithLogger(log.New(os.Stdout, "", 0)),
}