WARNING: The following contains spoilers for Stargirl Season 2, Episode 8, "Summer School: Chapter Eight," which aired Tuesday on the CW.

Stargirl's latest episode puts two members of the Justice Society of America to the test, as Eclipso torments Rick and Beth with terrifying visions of their greatest fears to break their wills. Rick is presented with evidence Solomon Grundy has killed a young girl. This would mean Rick was incorrect in his decision to spare Grundy's life at the end of the show's first season, even though Grundy was the one to orphan Rick in the first place. This revelation drives Rick into a bloodthirsty rage, and he nearly beats his uncle to death before Courtney can knock him out of it and reveal it was all an illusion. Rick breaks his hourglass in disgust, and the episode ends with him being taken to jail.

Beth's test is also a gauntlet of her worst fears, as Eclipso plays on anxieties around her parent's relationship and makes her question whether or not she truly deserves to be a member of the JSA. He's also virulently racist, telling Beth she's the "wrong age, wrong gender [and] wrong color." Beth's actor Angelika Washington broke down the necessity of that dynamic in an interview with CBR, explaining that it was a reflection of how Beth is "a Black superhero in this world, living in Nebraska, where she doesn't always feel valued or seen."

RELATED: Stargirl: Is The Shade Really Gone?

That undervalued perception of Beth Chapel also lines up with how she's been presented on Stargirl up to this point. The rest of the JSA is fiercely martial and athletic in varying amounts. Courtney was chosen by the Cosmic Staff and wields it as a powerful weapon in conjunction with her gymnastic prowess. Yolanda is a trained boxer and pulls off daredevil feats of acrobatics with the help of the Wildcat Suit. And Rick is the physically strongest of the team by far, acting as their heavyweight and anchor. This leads to Beth being outshined simply by virtue of her talents lying elsewhere. She is kind, compassionate and in possession of a keen intellect, fixing Doctor Mid-Nite's goggles without any help.

And it's that gentle heart and sharp mind that asserts itself at the end of the Stargirl episode, as Beth reclaims her goggles from Eclipso and puts them on, discovering with a start that they let her see through his illusions. It also leads to her reconnecting with Dr. McNider, who explains what's been going on and even warms up to her a little. There's a particularly poignant moment where she asks who Beth is and she declares that she's the new Doctor Mid-Nite. While Courtney, Rick and Yolanda have been unabashed in taking up their legacy superhero mantles and names, Beth always seemed a bit uncomfortable referring to herself as Doctor Mid-Nite. This new resolution fixes that and even ends with McNider entering her into the JSA database.

RELATED: Stargirl Releases First Look at John Wesley Shipp's JSA Flash

A neon green LED display showing Beth's portrait along with her identity as Dr. Mid-Nite.

Eclipso's greatest power over the last few episodes of Stargirl has been seeded in his ability to torment and play on the hidden fears of the JSA. His dark machinations were instrumental in causing Yolanda to give up the mantle of Wildcat, and the visions he gave Rick resulted in the new Hourman destroying his own powers. Beth's conviction and determination to push past her inner demons are what let her triumph over Eclipso, and it's that same conviction that will help push the JSA to victory.

The goggles' ability to see through the hallucinations Eclipso creates is a big deal, but Beth could never have discovered that capability if she hadn't repaired them in the first place. She didn't even fix them because she thought they helped fight crime — she did so out of compassion and a desire to resuscitate the AI "Chuck" that had inhabited them throughout the first season. Chuck has ultimately proved to be beyond her abilities to repair, but that urge to help him is what's yielded the JSA's only way to stand against Eclipso. In short, the new Doctor Mid-Nite's superpower isn't her goggles, costume or even her mind — it's the courage, kindness and generosity she approaches the rest of the world with.

Stargirl airs Tuesdays at 8 p.m. ET/PT on The CW.

KEEP READING: The CW Reveals Season Finale Dates For Supergirl, Riverdale, Stargirl and More