def header_blocks(test_count, failures):
    """
    Creates blocks for either success or failure

    Args:
        test_count: int - Total test count
        failures: List[TestFailure]
    Returns:
        List[Dict] - Block Kit representation for Slack posting
    """
    blocks = []
    if len(failures) > 0:
        blocks.append({
            "type": "header",
            "text": {
                "type": "plain_text",
                "text": f'Daily Tests - FAILED {len(failures)} TESTS',
            },
        })
    else:
        blocks.append({
            "type": "header",
            "text": {
                "type": "plain_text",
                "text": 'Daily Tests - PASSED',
            },
        })
    successes = test_count - len(failures)
    blocks.append({
        "type": "context",
        "elements": [
            {
                "type": "mrkdwn",
                "text": f'Passed *{successes}/{test_count}* tests',
            },
        ],
    })
    blocks.append({"type": "divider"})
    return blocks