Injecting javascript/html code (MITMF)

the course in “complete ethical hacking coruse” tells me to input this command:

mitmf --arp --spoof -i eth0 --gateway --target --inject --js-payload “alert(‘test’);”

it works and the target machine indeed recognized the arp spoof that i did. but the injected javascript doesn’t show/ pop up in the target machine

Pls help. thanks