How can a compass be used to check the strength of an electromagnet?

if the electromagnet is strong the compass will point to it not north but if it is weak it will still point north