Modified how handling jQuery reference in tests, this is better