class foo {
constructor() {
this._token = '';
}
I'm trying to mock an API call, and I want to inject a mocked value for this._token
. When a mocked value is hardcoded here, my mocked API call runs properly and my unit test passes.
I would like to somehow inject a value here. Is this possible?