Hiring and Personnel Management are Organizational Problems
Testing is a Design and Programming Concern
Modern TDD and BDD are architectural and programming concerns. In fact, I'd go so far as to say that any developer who hasn't embraced best-practice techniques like test-first design, continuous integration, DevOps pipelines, and so forth isn't really well-suited for most modern software projects.
Separate Technical Roles Aren't Permitted in Scrum
Even if you discount my statement above as personal or professional bias, from a Scrum perspective there are no "Programmer" or "Quality Assurance" roles on a Scrum Team. Everyone but the Scrum Master and the Product Owner is simply a [Product] Developer. In fact, the 2020 Scrum Guide explicitly states:
The Scrum Team consists of one Scrum Master, one Product Owner, and Developers. Within a Scrum Team, there are no sub-teams or hierarchies.
While the Scrum Team is certainly free to self-manage the team's workflows, treating programming and testing as separate concerns is generally a framework implementation smell. It simply doesn't lend itself to Scrum's collaborative model of whole-team product responsibility.
Point Out the Elephant in the Room
The X in the X/Y problem you describe is the organization's leadership and hiring practices. If the organization is hiring, encouraging, or retaining I-shaped people rather than T-shaped people, they are not actively supporting the Scrum framework.
Scrum won't magically turn a collection of individual contributors into a cohesive team that collaboratively self-manages; it simply provides a framework for talented and motivated people to apply their skills to a shared objective. This may be a good topic for your next Sprint Retrospective, but continuing problems with the skills or composition of the Scrum Team that can't be resolved internally should be made visible to senior leadership. Setting the right "tone at the top" for both company culture and personnel management are part of senior leadership's core responsibilities, so ensure that they have the information they need to make informed business decisions.