There are simple tests for freshness for both baking soda and baking powder.
How To Test Baking Soda
Add some white vinegar into a bowl, then pop a teaspoon of baking soda in.
If you see an immediate reaction of bubbles on the surface, the baking soda is fresh and fine to use.
If the mixture doesn’t react and you see no bubbles, you should throw it out and replace the baking soda.