Add the onions and the yams and let them brown for 10 minutes, stirring occasionally. (Be careful so that they don’t burn, if they get too dark too fast, lower the heat).
Cover the pan and let it all cook for another 10 minutes.
Toss in the basil, salt and pepper, and stir until well mixed.