While God allows us to go through trials (so that He would be glorified and we would grow in wisdom), He never tempts us to sin in those circumstances. All trials inherently test us in how we respond. Will we respond out of our own foolishness or in the wisdom God offers? Every trial and difficult circumstance ultimately exposes our own desires.
There is a long and protracted focus on our faith resulting in works in the book of James. The emphasis on works has caused some people to put the apostle Paul’s view of grace at odds with the views James, but nothing could be further from the truth. James is most likely the earliest letter written in the New Testament and as such show a strong pastoral care for how to live out our faith in Jesus in practical ways.