FIND YOUR NEXT FEW LINES

Results for “Testing & reusable patterns”

Small, practical examples. Search by task or narrow things down below.

68 snippets foundClear filters
GoTesting & reusable helpers

Check a function with table-driven cases

Check a function with table-driven cases using a complete Go program with explicit sample inputs.

Go✓ Tested
GoTesting & reusable helpers

Check whether bytes contain valid JSON

Check whether bytes contain valid JSON using a complete Go program with explicit sample inputs.

Go✓ Tested
GoTesting & reusable helpers

Clamp a value to an allowed interval

Clamp a value to an allowed interval using a complete Go program with explicit sample inputs.

Go✓ Tested
GoTesting & reusable helpers

Compare floats within a tolerance

Compare floats within a tolerance using a complete Go program with explicit sample inputs.

Go✓ Tested
GoTesting & reusable helpers

Compare two byte buffers

Compare two byte buffers using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularAccessibility & reusable patterns

Display untrusted-looking text without HTML execution

Display untrusted-looking text without HTML execution with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
GoTesting & reusable helpers

Distinguish end-of-input from other errors

Distinguish end-of-input from other errors using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularAccessibility & reusable patterns

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularAccessibility & reusable patterns

Group related controls with a fieldset and legend

Group related controls with a fieldset and legend with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularAccessibility & reusable patterns

Keep a secondary button from submitting a form

Keep a secondary button from submitting a form with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
GoTesting & reusable helpers

Limit the bytes read from a stream

Limit the bytes read from a stream using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularAccessibility & reusable patterns

Preserve input state when tracked records reorder

Preserve input state when tracked records reorder with a standalone Angular component and explicit browser behavior.

Angular✓ Tested