In a medium pot, bring the sugar, tea bags, star anise and 1 cup water to a simmer over medium, stirring to dissolve the sugar. Remove from the heat and let steep 3 minutes. Discard the tea bags and add the cranberries. Bring to a simmer over medium and cook, stirring occasionally, until the cranberries burst and the sauce thickens, about 15 minutes. Let cool. Cover and chill up to 4 days. Discard the star anise before serving.