Automatic Testing For The Generator Function In Javascript