Previous test was setting mainSessionID to 'main-session-123' and the next test expected undefined. The outer beforeEach wasn't properly resetting state between tests in the nested describe block. Adding a nested beforeEach ensures proper test isolation.