def extract_mocha_summary(lines):
    """
    Example mocha summary lines (both lines can be missing if no tests passed/failed):
    ✔ 3 tests completed
    ✖ 1 test failed
    """
    passes, fails = 0, 0
    for line in lines:
        if line and line[0] == '✔':
            passes = int(line.split()[1])
        elif line and line[0] == '✖':
            fails = int(line.split()[1])

    return {
        'total_tests': passes + fails,
        'passed_tests': passes,
        'failed_tests': fails
    }