The Resource class contains an internal setTimeout/setInterval to monitor access tokens/emit events prior to expiration. This prevents instances of this class from closing. In unit test environments (like tappedout), this prevents tests from closing. A method to close the resource or stop monitoring would allow unit testers to resolve this edge case by calling Resource.close().
The
Resourceclass contains an internal setTimeout/setInterval to monitor access tokens/emit events prior to expiration. This prevents instances of this class from closing. In unit test environments (like tappedout), this prevents tests from closing. A method to close the resource or stop monitoring would allow unit testers to resolve this edge case by callingResource.close().