Course/Chapter 6/2. Editing Pinned Data for Edge Cases
    intermediate
    Chapter 6: Pinning & Testing Strategies

    2. Editing Pinned Data for Edge Cases

    Modify pinned data to test unusual scenarios.

    12m Lesson 2 of 4

    The real power of pinning comes from editing the pinned data to simulate scenarios you wouldn't normally encounter during happy-path testing.

    Edge Cases to Test

    • - Empty arrays: What happens when no items are returned?
    • - Null/missing fields: Does your workflow handle missing data?
    • - Special characters: Unicode, HTML entities, SQL injection strings
    • - Large payloads: How does your workflow handle 1000+ items?
    • - Invalid formats: Wrong date formats, non-numeric strings where numbers expected

    How to Edit Pinned Data

    1. Pin the node output first
    2. Click the pencil icon next to the pin to edit
    3. Modify the JSON directly in the editor
    4. Save — downstream nodes now use your modified data

    Code Examples

    Edge Case Test Data
    json
    // Test with empty results
    []
    
    // Test with null/missing fields
    [{ "json": { "name": null, "email": "", "phone": undefined } }]
    
    // Test with special characters
    [{ "json": { "name": "O'Brien <script>alert('xss')</script>", "bio": "Line1\nLine2\tTabbed" } }]
    
    // Test with unexpected types
    [{ "json": { "amount": "not_a_number", "date": "invalid-date", "count": -1 } }]

    Pro Tips

    • 💡Create a "test data" sticky note in your workflow with common edge case values to copy-paste
    • 💡Always test the empty array case — many workflows silently break on zero items
    • 💡Test with unicode characters like emojis (🎉) and accented letters (café) to catch encoding issues

    Comprehension Quiz

    Answer 2 of 2 correctly to unlock lesson completion.

    1. Which edge case should you always test?

    2. How do you edit pinned data?

    Pass the quiz above to unlock lesson completion