Main point summary
James is saying that one should have complete joy when he/she faces any kind of test or trial. Through testing their faith, it produces steadfastness, or endurance, which in turns eventually makes them mature, complete and not wanting anything. This Steadfastness is only available through the testing of one's faith.
Πᾶσαν χαρὰν ἡγήσασθε, ἀδελφοί μου, ὅταν πειρασμοῖς περιπέσητε ποικίλοις,
e Count it all joy, my brothers, 1
Have absolute joy, my friends,
when you meet trials f of various kinds,
when you have tests of every nature,
γινώσκοντες ὅτι τὸ δοκίμιον ὑμῶν τῆς πίστεως κατεργάζεται ὑπομονήν.
for you know that g the testing of your faith h produces steadfastness.
for you have realized that through the testing of your faith, it produces endurance.
ἡ δὲ ὑπομονὴ ἔργον τέλειον ἐχέτω, ἵνα ἦτε τέλειοι καὶ ὁλόκληροι ἐν μηδενὶ λειπόμενοι.
And let steadfastness have its full effect,
Let endurance labor until it is full grown,
that you may be i perfect and complete, lacking in nothing.
so you may be perfect, even complete in every part, wanting nothing.