testing asynchronous javascript?