In fact, you do not need to falsify the environment variable. I usually add:
export class User
to the class description class of the class I want to check. (Be sure to keep the default value for your connected version of the same class).
Then I can test the component in the preferred way by importing the component without the need for such a relay in my test:
import { User } from '../User'
This eliminates the need for a ridiculous relay, and you can easily pass it to a component.
source
share