In these proceedings we report on heavy-flavour jet measurements performed by the ALICE Collaboration in pp and p–Pb collisions at √sNN = 5.02 TeV. While the presented pp results will focus on discussion of the dead cone effect and production of D0 and Λ+c hadrons in a jet, the new b-jet results constrain the magnitude of cold nuclear matter effects in p–Pb down to charged-particle jet
transverse momentum 10 GeV/c. Finally, recent measurements of leading subjet fragmentation functions of inclusive charged-particle jets in pp and Pb–Pb collisions at √sNN = 5.02 TeV will be presented.