If you legitimately have nothing to hide from the last 3 to 9 months (Including high strength painkillers without accompanying prescription. Endone, codeine, valium etc.)
Then your responses would be. Again I'm not a lawyer so this is just my opinions based on my own court case.
Do nothing. As I doubt a judge will order you to do it.
Or
Offer to do the test at the Ex's cost. She might withdraw her request if she has to pay for it.
The court is awarding the Child's time with your partner that's why the Orders are on him and not you two as a couple.
Your partner is assumed to be the responsible adult and in charge of keeping the child safe including the people he keeps around him(you).
I would speculate that your partner returning clean test results would be enough to satisfy the court that you are also not on drugs without any other supporting evidence.