test for a reader javascript