Using in an .ex file?

I’m attempting to remove some recurring code in my tests and create an .ex file with helper functions, which I import into test files. A problem I’ve run into is that I can’t seem to be able to use the live/2 function in an .ex file, as it can’t find a get/2 function. I can use it in an .exs file, but then I can’t import functions from the file.

Any advice?

Ok, I followed the get/2 in the live/2 macro to ConnTest and I think I figured it out. I needed the following imports and definition:

import Phoenix.ConnTest
import Phoenix.LiveViewTest

@endpoint YourAppWeb.Endpoint

Things seem to be working now.