Is the candidate pool really so poor that you actually need to test that are they able to perform these basic tasks?
And for the record, I try to interview people on their strengths, giving them the opportunity to show off what they know about the area where their greatest interest or experience lies. A shocking percentage of people (>50%) nevertheless fail to demonstrate even basic knowledge of syntax or language features in the language of their own choice. This is without even considering actual workplace skills like git, PR review, tickets, etc. as discussed above.