J. Adams points out in his commentary:
Michael VoytekThe same experience may be viewed from either of two perspectives. Indeed, the whole point of James' teaching is that the same event can go either way. It can become a trial strengthening you or a temptation weakening you, depending on how you respond to it.Do you understand what he is saying? Anything in life can be a test designed to strengthen your faith. That same test can be a temptation that brings you down. It could be prosperity...It could be poverty. It could be a raise at work. It could be losing a job. It could be getting cancer. It could be having a baby. Whatever comes in life, whatever test that comes our way, how we react to it determines whether it is a test or a temptation. That same event can be looked at from either perspective, depending on how you respond to it. So the challenge before us is our response, not the trial in itself. It is how you respond to the test that God brings your way.1
12 Blessed is the man who remains steadfast under trial, for when he has stood the test he will receive the crown of life, which God has promised to those who love him.