Diagnosis of ascariasis typically involves the examination of stool samples under a microscope to identify Ascaris eggs. In some cases, imaging techniques like X-rays or ultrasound may be used to detect adult worms in the intestines. Blood tests may also show elevated levels of eosinophils, a type of white blood cell, indicating a parasitic infection.